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

Who of the following scientists is named after ISRO in sriharikota ?

A) APJ Abdul Kalam B) Vikram Sarabhai
C) Homi J Baba D) Satish Dhawan
 
Answer & Explanation Answer: D) Satish Dhawan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

38 6385
Q:

Rearrange the parts of the sentence in correct order

The last issue

P-can bend policy by virtue of its control over its users
Q-how a powerful monopoly
R-we need to examine is

 

A) QRP B) QPR
C) PRQ D) RQP
 
Answer & Explanation Answer: D) RQP

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 6383
Q:

Which of the statements given below are correct?

1. The author of 'The Great Indian Novel' is A.P.J. Abdul Kalam.
2. The author of 'A Foreign Policy For India' is I.K Gujral.
3. 'Wings of Fire' is an Autobiography of A.P.J. Abdul Kalam.

A) 1 and 2 B) 2 and 3
C) 1 and 3 D) 1, 2 and 3
 
Answer & Explanation Answer: B) 2 and 3

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams

0 6379
Q:

‘Sea Vigil-21’ is a Defence Exercise undertaken by which country?

 

A) China B) Japan
C) India D) United Kingdom
 
Answer & Explanation Answer: C) India

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

0 6375
Q:

Point out which from the following is NOT a right enumerated in the Constitution of India but has been articulated by the Supreme Court to be a Fundamental Right

A) Right to life B) Equality of opportunity in matters of public employment
C) Protection of personal liberty D) Right to permanent housing
 
Answer & Explanation Answer: D) Right to permanent housing

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

8 6372
Q:

Which country has always remained free from foreign rule?

A) Phillipines B) Nepal
C) USA D) Laos
 
Answer & Explanation Answer: B) Nepal

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History

8 6372
Q:

Which of the following is NOT a measure of Human Development Index?

 

A) Life expectancy B) Sex ratio
C) Literacy rate D) Gross enrolment
 
Answer & Explanation Answer: B) Sex ratio

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy
Exam Prep: Bank Exams

0 6370