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

The memory unit is one part of

A) Input Device B) Central Processing Unit
C) Control Unit D) Output device
 
Answer & Explanation Answer: B) Central Processing Unit

Explanation:

In a computer, memory is one part of Central processing unit i.e, CPU.

Report Error

View Answer Report Error Discuss

14 6768
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 6767
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 6763
Q:

What is the currency of cuba?

A) Kuna B) Peso
C) Dollar D) None
 
Answer & Explanation Answer: B) Peso

Explanation:

Peso is the currency of Cuba

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

33 6757
Q:

In which atmospheric layer are the communication satellites located?

A) Thermosphere B) Troposphere
C) Mesosphere D) Stratosphere
 
Answer & Explanation Answer: A) Thermosphere

Explanation:

In terms of the Earth's atmosphere, they occupy regions called the thermosphere and the exosphere. The layer through which a satellite orbits depends on the satellite's function and the kind of orbit it has.

 

The thermosphere is a region of very high temperature that extends from the top of the mesosphere at around 85 kilometers (53 miles) up to 640 kilometers (400 miles) above the Earth's surface. It is called the thermosphere because temperatures can reach up to 1,500 degrees Celsius (2,732 degrees Fahrenheit).

 

However, despite the high temperatures, the pressure is very low, so satellites don't suffer heat damage.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

8 6754
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 6754
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