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 6584
Q:

Iteration is most similar in meaning to

A) Looping B) Starting
C) Ending D) None of the above
 
Answer & Explanation Answer: A) Looping

Explanation:

Iteration means doing something again and again, repeatedly,... 

 

Hence, looping is a process of repeating a method and so it is similar in meaning to Iteration.

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO , Database Administration

3 6582
Q:

Wireless transmission can be done via

A) Infrared waves B) Radio waves
C) Microwaves D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

Wireless transmission can be done via any of the Infrared waves, Radio waves or Microwaves.

Report Error

View Answer Report Error Discuss

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

6 6578
Q:

The Highest dam in india is the _________dam

A) Maithan B) Bhakra
C) Hirakud D) Machkund
 
Answer & Explanation Answer: B) Bhakra

Explanation:

The Bhakra dam is 226 metres high and is one of the highest dams in the world.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

4 6577
Q:

One of the following sites from where the famous Bullseal of Indus Valley Civilization was found

A) Harappa B) Chanhudaro
C) Lothal D) Mohenjodaro
 
Answer & Explanation Answer: A) Harappa

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

3 6575
Q:

Which rock system has the maximum concentration of minerals?

A) Cuddapah system B) Dharwar system
C) Gondwana system D) Vindhyan system
 
Answer & Explanation Answer: B) Dharwar system

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

8 6566
Q:

Which of the following features may occur when lava cool at the surface

A) Basalt plateau B) Still
C) Batholith D) Dyke
 
Answer & Explanation Answer: A) Basalt plateau

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

5 6563
Q:

During Processing data, programs, and processed information are held temporarily in _________

A) Secodary stoage B) ROM
C) RAM D) None of these
 
Answer & Explanation Answer: C) RAM

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer

20 6558