Questions

Q:

If the following program (myprog) is run from the command line as 

myprog 1 2 3 

what would be the output?

main(int argc, char *argv[])

{

    int i, j = 0;

    for (i = 0; i < argc ; i++)

           j = j + atoi ( argv[i]);

    printf ("%d", j);

}

A) 123 B) 6
C) Error D) "123"
 
Answer & Explanation Answer: B) 6

Explanation:

When atoi() tries to convert argv[0] to a number it cannot do so (argv[0] being a file name) and hence returns a zero.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 22807
Q:

Who founded in Pataliputra

A) Udayin B) Ashoka
C) Bimbisar D) Mahapadmananda
 
Answer & Explanation Answer: A) Udayin

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

66 22728
Q:

The smallest Union Territory of India is 

A) Lakshadweep B) Pondicherry
C) Daman and Diu D) Dadar and Nagar Haveli
 
Answer & Explanation Answer: A) Lakshadweep

Explanation:

Lakshadweep has an area of only about 32 sq km.

 

The_smallest_Union_Territory_of_India_is1554209119.jpg image

 

The area of Pondicherry, Daman and Diu and Dadar and Nagar Haveli are about 492 sq km and 491 sq km respectively.

Report Error

View Answer Report Error Discuss

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

40 22716
Q:

Join Our Whatsapp Group For Competitive Exams - Sawaal

Answer

In this Whatsapp group for competitive exams, you can get daily updates about Aptitude, Reasoning, General Knowledge, Current Affairs, Puzzles, Certfications, Interviews, Exams Schedules, etc... In addition you can ask your questions to get answers with tricks and tips.


 


Click Here To Join This Whatsapp Group


 


whatsapp_group_for_competitive_exams1541477851.jpg image


 


Join our Best General Knowledge (GK) Whatsapp Group here.

Report Error

View answer Workspace Report Error Discuss

164 22716
Q:

Padma Shri - Dr Sundaram (S) Ramakrishnan passed away recently. What was his profession?

 

A) Scientist B) Politician
C) Engineer D) Doctor
 
Answer & Explanation Answer: A) Scientist

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities
Exam Prep: Bank Exams

1 22689
Q:

USB is which type of storage device?

A) Tertiary B) Secondary
C) Primary D) Auxillary
 
Answer & Explanation Answer: B) Secondary

Explanation:

USB - Universal Serial Bus is a secondary type of storage device which is used in all computers, laptops, mobiles...

USB1533034422.jpg image

It is a plug-and-play portable storage device that uses flash memory and is lightweight enough to attach to a keychain.

Report Error

View Answer Report Error Discuss

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

58 22670
Q:

Fedaration cup,World cup, Allwyn international trophy and challenge cup are awarded to winners of

A) Tennis B) Volleyball
C) Basketball D) Cricket
 
Answer & Explanation Answer: B) Volleyball

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

163 22647
Q:

Chinese traveller Hiuen-Tsang studied at the University of

A) Taxila B) Vikramshila
C) Magadh D) Nalanda
 
Answer & Explanation Answer: D) Nalanda

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

49 22641