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 6412
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 6411
Q:

Which of the statements given below are correct?

1. The author of the novel 'Gilead' is Don Winslow.
2. The author of the novel 'Wolf Hall' is Stephen Dobyns.
3. The author of the novel 'To Kill a Mockingbird' is Harper Lee.

A) 1 and 2 B) 2 and 3
C) 1 and 3 D) 1, 2 and 3
 
Answer & Explanation Answer: A) 1 and 2

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams

0 6410
Q:

Teotihuacan Pyramids is located in which country?

A) Agentina B) Peru
C) Mexico D) Laos
 
Answer & Explanation Answer: C) Mexico

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Places

10 6410
Q:

Elements having same atomic numbers but different mass number are called ______.

 

 

A) isotones B) Isotopes
C) isomopes D) isobar
 
Answer & Explanation Answer: B) Isotopes

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: Bank Exams

0 6410
Q:

Select the word with the correct spelling.

 

A) oxidieser B) thespian
C) aproval D) secreetes
 
Answer & Explanation Answer: B) thespian

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 6401
Q:

What is so delicate that even mentioning it breaks it?

Answer

Silence is what is so delicate that even mentioning it breaks it.

Report Error

View answer Workspace Report Error Discuss

8 6399
Q:

In photography, the compound of nitrogen used is 

A) Potassium nitrate B) Silver nitrate
C) Ammonium carbonate D) Ammonium bicarbonate
 
Answer & Explanation Answer: B) Silver nitrate

Explanation:

Silver nitrate is the basic substance from which silver bromide is obtained. The photographic films are impregnated with the light sensitive AgBr.

Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

12 6390