Questions

Q:

What do the functions atoi(), itoa() and gcvt () do? Show how would you use them in a program.

Answer

atoi()         Converts a string to an integer.


itoa()         Convert an integer to a string


gcvt()        Converts a floating-point number to a string


 


#include "stdlib.h"


main()


{


      char s[] = "12345";


      char buffer [15], string[20];


      int i;


      


      i = atoi (s);


      printf("\n%d",i);


 


       gcvt (20.141672, 4, buffer);


       printf ("\n%s", buffer);


 


       itoa(15, string,2);


        printf ("\n%s", string);


}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

2 6369
Q:

Computer software can be defined as

 

A) the interaction between the computer and its database B) an interface between the computer and the network
C) the computer and its associated equipment D) the instructions that tell the computer what to do
 
Answer & Explanation Answer: D) the instructions that tell the computer what to do

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams

3 6367
Q:

What is the first step in the refining of petroleum?

A) Distillation B) Cooling
C) Drilling D) Cracking
 
Answer & Explanation Answer: A) Distillation

Explanation:

The first step in the refining of petroleum is distillation i.e,  the fractionation of crude oil in atmospheric and vacuum distillation towers.

The first process petroleum refinery is known as distillation. In this process, crude oil is heated and fed into a distillation column. As the temperature of the crude oil in the distillation column rises, the crude oil separates itself into different components, called "fractions." The fractions are then captured separately. Each fraction corresponds to a different type of petroleum product, depending on the temperature at which that fraction boils off the crude oil mixture.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

18 6362
Q:

Coral Reefs in India can be found in

A) Rameshwaram B) Trivandrum
C) The coast of Orissa D) Waltair
 
Answer & Explanation Answer: A) Rameshwaram

Explanation:

In India Coral Reefs can be found in Rameshwaram.

 

Coral reefs in India are one of the most ancient and dynamic ecosystems of India. The coral reefs not only provide a sanctuary to a myriad of marine life but also play a key role in protecting the coastline from erosion.

Coral reefs are diverse underwater ecosystems held together by calcium carbonate structures secreted by corals. Coral reefs are built by colonies of tiny animals found in marine water that contain few nutrients.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk

17 6360
Q:

If (a+c+1) = 0, then find the value of a3 + c3 + 1 - 3ac

 

 

A) -1 B) 1
C) 2 D) 0
 
Answer & Explanation Answer: D) 0

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards
Exam Prep: Bank Exams

0 6352
Q:

Which of the following movements was headed by Sitaram Raju?

 

A) Kuka Movement B) Rampa Movement
C) Pabna Agitation D) Bardoli Satyagraha
 
Answer & Explanation Answer: B) Rampa Movement

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

4 6344
Q:

Improve the bracketed part of the sentence.

Having finished the voluminous novel, (it was being put away by him).

A) was put away by him B) he has had put it away
C) he put it away D) no improvement
 
Answer & Explanation Answer: C) he put it away

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams , GRE

0 6343
Q:

Who of the following scientists is named after ISRO in sriharikota ?

A) APJ Abdul Kalam B) Vikram Sarabhai
C) Homi J Baba D) Satish Dhawan
 
Answer & Explanation Answer: D) Satish Dhawan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

38 6340