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

Solve this logical Math puzzle?

logical_thinking_puzzle1536132282.jpg image

Answer

Let that something be 'x'


From the given data,


x + x/5 = 21


5x + x/5 = 21


6x = 21 x 5


=> x = 17.5


 


Hence, that something is x = 17.5.

Report Error

View answer Workspace Report Error Discuss

9 6757
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 6753
Q:

In which country did the hotaki dynasty flourish?

A) Sri Lanka B) China
C) Nepal D) Afghanistan
 
Answer & Explanation Answer: D) Afghanistan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History
Exam Prep: Bank Exams

4 6753
Q:

A famous hill station in Uttar pradesh is...........

A) Darjeeling B) Dalhousie
C) Kulu D) Nainital
 
Answer & Explanation Answer: D) Nainital

Explanation:

Darjeeling is in West Bengal and other two are in Himachal Pradesh.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

18 6752
Q:

Missing letters puzzle

Answer

Answer:  K


Explanation:  In each row, the product of the left and right hand numbers equals the sum of the numerical values of the three letters.

Report Error

View answer Workspace Report Error Discuss

31 6752
Q:

When you travel in certain parts of India, you will  notice red soil. What is the main reason for this colour?

A) Abundance of magnesium B) Accumulated humus
C) Presence of ferric oxides D) Abundance of Phosphates
 
Answer & Explanation Answer: C) Presence of ferric oxides

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

12 6750
Q:

Kurukshetra , the sence of the epic battle between Kauravas and pandavas, is situated in 

A) Gujarat B) Punjab
C) Uttar Pradesh D) Haryana
 
Answer & Explanation Answer: D) Haryana

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

97 6750