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 6737
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 6732
Q:

On which day ' National Science Day ' is celebrated in India ?

A) February 23 B) February 25
C) February 26 D) February 28
 
Answer & Explanation Answer: D) February 28

Explanation:

National Science Day is celebrated in India on 28 February each year to mark the discovery of the Raman effect by Indian physicist Sir Chandrashekhara Venkata Raman on 28 February 1928.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk

23 6731
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 6731
Q:

Which type of entity is related to two or more associated entities that each contain specialized attributes that apply to some but not all of the instances of the entity?

A) Supertype entity B) Subtype entity
C) Archetype entity D) Instance entity
 
Answer & Explanation Answer: A) Supertype entity

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

2 6729
Q:

GUI stands for

A) Graphical Universal Interface B) Graph Use Interface
C) Graphical Unique Interface D) Graphical User Interface
 
Answer & Explanation Answer: D) Graphical User Interface

Explanation:

GUI stands for Graphical User Interface.

 

A Graphical User Interface is a computer interface that allows users to interact with a device through graphical elements such as pictures and animations, as opposed to text-based commands.

Report Error

View Answer Report Error Discuss

9 6727
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 6721
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 6720