Questions

Q:

Point out the error, if any, in the following program.

#include "stdarg.h"

main()

{

     display ( 4, 12.5, 13.5, 14.5, 44.3);

}

display(int num, ...)

{

       float c; int j;

        va_list ptr;

        va_start (ptr, num);

        for ( j = 1; j <= num; j++)

        {

            c = va_arg ( ptr, float );

            printf ("\n%f", c);

         }

}

Answer

While extracting a float argument using va_arg we should have useed 


c = va_arg (ptr, double)

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 5633
Q:

India’s first smartcard-based Public Bicycle Sharing (PBS) initiative “Trin Trin” has launched in which city  ?

A) Chennai B) Mysuru
C) Bangalore D) Goa
 
Answer & Explanation Answer: B) Mysuru

Explanation:

India’s first smartcard-based Public Bicycle Sharing (PBS) initiative has launched in Mysuru, Karnataka on June 4, 2017. The cost of the project, partly funded by World Bank’s Global Environmental Facility, for the next six years is Rs 20.5 crore, covering the maintenance of the docking stations and bicycles. About 450 bicycles will be available for public use in the city. To rent a bicycle, the citizens of Mysuru or tourists need to register themselves either online or by visiting one of the six registration centres situated close to tourism centres and obtain a smart card after paying Rs. 350, including a refundable deposit of Rs. 250. Though the use of the bicycle is free for the first one hour, the users will have to pay a nominal fee of Rs. 5 for two hours, Rs. 10 for three hours and so on.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk

7 5633
Q:

 In the relational model, relationships between relations or tables are created by using:

A) composite keys. B) determinants.
C) candidate keys. D) foreign keys.
 
Answer & Explanation Answer: D) foreign keys.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

1 5633
Q:

Chandra and Bhaga , the two streams join to form ________river

A) Jhelam B) Indus
C) Ravi D) Chenab
 
Answer & Explanation Answer: D) Chenab

Explanation:

It is the largest of all tributaries of Indus and rises in the Himalayan region in Himachal Pradesh

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

6 5632
Q:

Two bulbs are fitted in a room in the domestic electric installation. One of them glows brighter than the other. Then

A) the brighter bulb has smaller resistance B) the brighter bulb has larger resistance
C) both the bulbs have the same resistance D) none of these
 
Answer & Explanation Answer: A) the brighter bulb has smaller resistance

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

9 5632
Q:

Hollywood movie named The Black Prince recently won the Special Jury Remi Award at the 50th annual Worldfest-Houston International Film Festival. Which Indian actress has acted in this movie  ?

A) Shabana Azmi B) Deepika Padukone
C) Juhi Chawla D) Priyanka Chopra
 
Answer & Explanation Answer: A) Shabana Azmi

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

3 5631
Q:

Nathu La pass is in

A) Sikkim B) Bhutan
C) Arunachal Pradesh D) Jammu and Kashmir
 
Answer & Explanation Answer: A) Sikkim

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

5 5626
Q:

Driest areas of India which lie Rajastan have an average annual rainfall of _____

A) 10 cm B) 1cm
C) Between 1 cm to 10 cm D) Less than 1cm
 
Answer & Explanation Answer: D) Less than 1cm

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

5 5622