Questions

Q:

If the following structure is written to a file using fwrite(), can fread() read it back successfully?

struct emp

{

    char *n;

    int age;

};

struct emp e = { "Sujay",15};

FILE *fp;

fwrite (&e, sizeof (e), 1, fp);

Answer

No, since the structure contains a char pointer while writing the structure to the disk using fwrite() only the value stored in the pointer n would get written. When this structure is read back the address would be read back but it is quite unlikely that the desired string would be present at this address in memory

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2704
Q:

What is the Name of first cricketer of India to have a cricket stadium in the name of him ?

A) Sachin Tendulkar B) Sunil Gavaskar
C) Saurav Ganguly D) Virender Sehwag
 
Answer & Explanation Answer: B) Sunil Gavaskar

Explanation:

The legendary Indian cricketer Sunil Gavaskar has achieved a number of milestones in his cricket career and till this day, can now add another feather to his illustrious cap as a stadium in the United States of America will be named after him and he remains an inspiration for aspiring batsmen across India. The stadium, which is being built in Louisville, Kentucky, will be named as Sunil Gavaskar Field. It is a first for any Indian cricketer.

Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

15 2704
Q:

Which of these provides your body with energy?

A) Carbohydrates B) Fats
C) Vitamins D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

Nutrients are the substances in food that provide the raw materials and energy the body needs to carry out all its essential processes.

There are six groups of nutrients:

1. Carbohydrates.

2. Fats.

3. Proteins.

4. Vitamins.

5. Minerals.

6. Water.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

8 2703
Q:

Physical data models describe the details of how data is stored in the computers

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

They describe the details of how data is stored in the computers

Report Error

View Answer Workspace Report Error Discuss

Subject: Database
Job Role: Database Administration

0 2703
Q:

Which one of the following is an abiotic and renewable resource

A) Iron ore B) Livestock
C) Water D) Forests
 
Answer & Explanation Answer: C) Water

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

2 2703
Q:

Which one of the following is the Highest Award in India ?

A) Bharat Ratna B) Padma Bushan
C) Khel Ratna D) None of these
 
Answer & Explanation Answer: A) Bharat Ratna

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards
Exam Prep: Bank Exams
Job Role: Bank Clerk , Bank PO

3 2702
Q:

Name the last Trithankara

A) Parsvanath B) Mahavira
C) Siddhartha D) Subhadra
 
Answer & Explanation Answer: B) Mahavira

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

3 2701
Q:

Who is the Author of the book "A Passage to India"?

A) V.S.Naipaul B) E.M.Foster
C) Amrita Pritam D) L.Fischer
 
Answer & Explanation Answer: B) E.M.Foster

Explanation:

Author of the book Passage to India is E.M.Foster . This book is selected as one of the 100 great works of the english literature and won James Tiat Black  memorial prize for fiction in the year 1924

Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

1 2701