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 6753
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:

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 6748
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:

Solve The Logical Number Puzzle?

A) 72 B) 76
C) 84 D) 90
 
Answer & Explanation Answer: D) 90

Explanation:

The logic in the given puzzle is 

4 + 4 = 4 * 4+1 = 4 * 5 = 20

5 + 5 = 5 * 5+1 = 5 * 6 = 30

6 + 6 = 6 * 6+1 = 6 * 7 = 42

7 + 7 = 7 * 7+1 = 7 * 8 = 56

Similarly

9 + 9 = 9 * 9+1 = 9 * 10 = 90.

Report Error

View Answer Report Error Discuss

Filed Under: Number Puzzles
Exam Prep: CAT , Bank Exams , AIEEE

35 6745
Q:

How would you go about greeting each customer who comes in the store?

Answer

If you want bonus points, make sure you address each side of this tricky two-part question. 


The first part is addressing how you make sure you greet each and every customer who enters the store, giving them personal attention.  


The second part is how you would actually greet them – what would you say to them? Would you alert them of your newest products, ask if they’re looking for anything in particular or need guidance while shopping, or alert them to who they can reach out to if they require any assistance in various departments?

Report Error

View answer Workspace Report Error Discuss

Subject: Retail

6 6745
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 6745