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

Operating system functions may include

A) multiprogramming B) input/output control
C) virtual storage D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

An operating system has three main functions:

(1) manage the computer's resources, such as the central processing unit, memory, disk drives, and printers,

(2) establish a user interface, and

(3) execute and provide services for applications software.

Report Error

View Answer Report Error Discuss

5 2897
Q:

Government regulation is intended to

A) discourage producers from taking harmful actions. B) encourage producers to follow the Constitution.
C) discourage producers from making a profit. D) encourage producers to take negative actions.
 
Answer & Explanation Answer: A) discourage producers from taking harmful actions.

Explanation:

Government regulation protects constitutional rights, safety, and fairness.

 

Hence, Government regulation is intended to discourage producers from taking harmful actions.

Report Error

View Answer Report Error Discuss

3 2897
Q:

‘KAPILA’ programme, which was making news recently, is associated with which sector?

 

A) MSME B) Intellectual Property Rights
C) Aviation D) Automobile
 
Answer & Explanation Answer: B) Intellectual Property Rights

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy
Exam Prep: Bank Exams

3 2896
Q:

What color is a giraffe's tongue?

A) Purple B) Brown
C) Black D) Yellow
 
Answer & Explanation Answer: A) Purple

Explanation:

The color of giraffe's tongue is purple or bluish to prevent it from sunburn as it lives in tropical regions.

what_color_is_a_giraffes_tongue1545024284.JPG image

Report Error

View Answer Report Error Discuss

Filed Under: Animals and Birds
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

8 2896
Q:

Who set to become India’s 46th Grandmaster at the Sharjah Masters 2017 chess tournament ?

A) Srinath Narayanan B) Praggnanandhaa
C) Shyaamnikhil D) Grover Sahaj
 
Answer & Explanation Answer: A) Srinath Narayanan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

6 2896
Q:

Which of the statements given below are correct?

 

A) In 2017, Stephen Curry played for the NBA team Milwaukee Bucks.

B) Sebastian Vettel won the Formula One 2017 Singapore Grand Prix.

C) Roger Federer won the Tennis 2017 Miami Open Men's Singles.

 

A) Only C B) B and C
C) A and C D) A, B and C
 
Answer & Explanation Answer: A) Only C

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports
Exam Prep: Bank Exams

0 2896
Q:

How many Indians have so far been awarded the Nobel Prize

A) 2 B) 3
C) 4 D) More than 4
 
Answer & Explanation Answer: D) More than 4

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards

0 2895