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 6708
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 6701
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 6699
Q:

Which ocean surrounds Antarctica?

A) Atlantic ocean B) Indian ocean
C) Pacific ocean D) Southen ocean
 
Answer & Explanation Answer: D) Southen ocean

Explanation:

Antarctica is surrounded on all sides by water. The Indian, Pacific and Atlantic Oceans surround it on all sides. These three Oceans all meet at Antarctica. The three oceans are collectively called the Southern Ocean.

This is the area located south of 50° latitude.

Report Error

View Answer Report Error Discuss

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

10 6696
Q:

Chola Empire was divided into ____

A) Mandalams, Nadu, Avanti & Kurram B) Mandalams, Nadu, Malkhand & Kurram
C) Avanti, Nadu, Malkhand & Kurram D) Mandalams, Nadu,Kurram & Valanadu
 
Answer & Explanation Answer: D) Mandalams, Nadu,Kurram & Valanadu

Explanation:
Report Error

View Answer Report Error Discuss

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

26 6694
Q:

Who invented fuel cells in 1839?

A) Buckminster Fuller B) Sir William Grove
C) Sylvester Graham D) Joyce Hall
 
Answer & Explanation Answer: B) Sir William Grove

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions

11 6687
Q:

Minute hand overlaps hour hand in 65 mins. In how many days it will gain 1440 hours ?

A) 57 days B) 58 days
C) 60 days D) 61 days
 
Answer & Explanation Answer: C) 60 days

Explanation:

In this problem , it has considered that 65 mins = 1hr
So mins has increased by 5 mins so multiply 5 x 24 = 120 mins extra ,
That is now per day it adds 2hr extra, so divide 1440/26 = 59.384 days =~ 60 days.

Report Error

View Answer Report Error Discuss

Filed Under: Clock puzzles
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

38 6683
Q:

abcdefghijklmnopqrstuvwxyz Riddle

What sentence contains all abcdefghijklmnopqrstuvwxyz?

Answer

The Quick Brown Fox Jumped Over The Lazy Dog  is the sentence which contains all 26 alphabets i.e, from a to z.

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer , Project Manager

14 6682