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 6752
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 6749
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 6747
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 6746
Q:

A tennis ball machine serves a ball vertically into the air from a height of 2 feet, with an initial speed of 110 feet per second. After how many seconds does the ball attain its maximum height?

A) 2.87 sec B) 3.44 sec
C) 4.65 sec D) 5.41 sec
 
Answer & Explanation Answer: B) 3.44 sec

Explanation:

It is launched vertically with an initial speed of 110 ft/sec.

It will reach maximum height when the speed drops to 0.

Vo=110 feet per second 

ho=2 feet 

So, h(t) = -16t^2 +110t +2 

Take the derivative: h'(t) = 110 -32t 

The maximum height will be at the inflection when the derivative crosses the x-axis, then h'(t)=0. 

So, set h'(t)=0 and solve for t: 

0 = 110 -32t 

-110 = -32t 

t=3.4375 

t=3.44 seconds.

 

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

3 6746
Q:

Explain CBA.

Answer

CBA – Collective Bargaining Agreement is the result of collective bargaining procedure. 


These agreements can be in one of the two forms: 


i.) Procedural agreement


ii.) Substantive agreement


Procedural agreements – They usually deal with the relationship between employees and employers to resolve individual and group issues. These are usually filed in the company’s rule book. 


Substantive agreements – This kind of an agreement deals with specific issues like basic pay, leave policy, bonus payment etc.

Report Error

View answer Workspace Report Error Discuss

Subject: Law

10 6745
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 6743
Q:

When and by whom the PIN coode system was introduced in India ?

A) Savinder Singh B) Shriram Bhikaji Velankar
C) D.R. Khullar D) Mahesh Barnwal
 
Answer & Explanation Answer: B) Shriram Bhikaji Velankar

Explanation:

The PIN code system was introduced on 15 th August 1972 by Shriram Bhikaji Velankar. Currently India has six digit post code and soon it will be converted in eight digits.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

29 6741