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

The blue colour of the clear sky is due to 

A) Diffraction of light B) Dispersion of light
C) Reflection of light D) Refraction of light
 
Answer & Explanation Answer: B) Dispersion of light

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science

22 6959
Q:

The bonds in the compound MgSO4 can be described as

A) covalent B) ionic
C) both A & B D) None of the above
 
Answer & Explanation Answer: C) both A & B

Explanation:

Here the given compound is MgSO4.

In the given compound, Sulphur (S) and Oxygen (O) are two non metals and Magnesium (Mg) is a metal.

In this compound, Sulphur and Oxygen reacts to form covalent bond and the metal Magnesium reacts with both non metals Sulphur and Oxygen to form ionic bonds.

 

Hence, in the given compound MgSO4 there are both covalent and ionic bonds.

Report Error

View Answer Report Error Discuss

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

1 6958
Q:

The rolling plan concept in our country started with the

A) Third plan B) Fourth plan
C) Fifth plan D) Seventh plan
 
Answer & Explanation Answer: C) Fifth plan

Explanation:

The Rolling plan refers to one-year plans in the five-year perspective. under Rolling plan, there would be an annual appraisal of the progress of the plan and on the basis of such an appraisal, the plan for the next year will be prepared. The plan would go on rolling year after year.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

17 6953
Q:

Why does'nt the hydrogen atom emit X-rays?

A) It is very small in size B) It has only one electron
C) Its energy levels are very close to each other D) it is highly electropositive
 
Answer & Explanation Answer: C) Its energy levels are very close to each other

Explanation:

For an atom to emit X-rays it should have difference in energy levels

Report Error

View Answer Report Error Discuss

Filed Under: Physics

9 6948
Q:

Which day was declared as the 'Direct Action Day' by the Muslim League ?

A) 3rd September 1946 B) 16th August 1946
C) 16th may 1946 D) 4th December 1946
 
Answer & Explanation Answer: B) 16th August 1946

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

19 6948
Q:

Which state government has inaugurated the upgraded version of police helpline Namma 100, where police officials will be deputed within 15 minutes to the spot of emergency  ?

A) Karnataka B) Telangana
C) Tamil Nadu D) Madhya Pradesh
 
Answer & Explanation Answer: A) Karnataka

Explanation:

Karnataka CM Siddaramaiah has inaugurated the upgraded version of police helpline Namma 100, where police officials will be deputed within 15 minutes to the spot of emergency, for Bengaluru. Based on the model adapted in London, which has helpline 999, and USA, where 911 helpline operates, Namma 100 helpline allows the public to access several facilities on a single number.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

11 6941
Q:

The Green Revolution in India was the outcome of the efforts of who amongst the following?

A) Dr MS Swaminathan B) Dr C Rangarajan
C) KV Kamath D) Dr Rakesh Mohan
 
Answer & Explanation Answer: A) Dr MS Swaminathan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

18 6941