Questions

Q:

How would you free the memory allocated by the following program?

#include "alloc.h"

#define MAXROW 3

#define MAXCOL 4

main()

{

     int **p, i;

     p = (int **) malloc (MAXROW * sizeof (int *));

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

            p[i] = (int *) malloc (MAXCOL * sizeof (int ));

}

Answer

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


free (p[i]);


free (p);

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 3742
Q:

Govind Talwalkar,recipient of the recently announced B.D.Goenka Award for excellence in Journalism, was the editor of which of the following newspapers

A) LokSatta B) The Maharastra Times
C) The Tribune D) Nay Bharat Times
 
Answer & Explanation Answer: B) The Maharastra Times

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

4 3742
Q:

Banaue Rice Terraces in Ifugao is located in which country?

A) Burma B) Brunei
C) Philippines D) India
 
Answer & Explanation Answer: C) Philippines

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Places

5 3740
Q:

What is the capital of Bangladesh ?

A) Dhaka B) Chittagong
C) Khulna D) Sylhet
 
Answer & Explanation Answer: A) Dhaka

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Country Capitals

18 3739
Q:

What Room can Nobody Enter?

A) War room B) Spare room
C) Escape room D) Mushroom
 
Answer & Explanation Answer: D) Mushroom

Explanation:

The Room can Nobody Enter is a Mushroom.

Report Error

View Answer Report Error Discuss

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

7 3736
Q:

Govind Ballabh Pant, was the first Chief Minister of which state?

 

A) Goa B) Himachal Pradesh
C) Uttar Pradesh D) Gujarat
 
Answer & Explanation Answer: C) Uttar Pradesh

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities
Exam Prep: Bank Exams

0 3734
Q:

' Ashoka Chakra ' is awarded for 

A) Outstanding contribution to literature B) Gallantry by children
C) Acts of gallantry in the presence of the enemy D) Acts most conspicuous bravery of self saccrifice on land, air or sea but not in the presence of the enemy
 
Answer & Explanation Answer: D) Acts most conspicuous bravery of self saccrifice on land, air or sea but not in the presence of the enemy

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards

3 3733
Q:

What is the name of the writer of indian origin whose novel, "The Inheritance of Loss" has bagged Man Booker Prize?

A) Vikram Seth B) Kiran Desai
C) Salman Rushdie D) V.S Naipaul
 
Answer & Explanation Answer: B) Kiran Desai

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 3731