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

The famous hill-station Kodaikanal lies in

A) Palani hills B) Javadi hills
C) Nilgiri hills D) Cardamom hills
 
Answer & Explanation Answer: A) Palani hills

Explanation:

The famous hill-station Kodaikanal lies in Palani hills.

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

0 3962
Q:

Cretinism is due to the disorder of the glands

A) Thymus B) Parathyroid
C) Thyroid D) Adrenal
 
Answer & Explanation Answer: C) Thyroid

Explanation:

Cretinism is a disease caused by hypothyroidism (less thyroxine formation) . The symptoms of the disease are retardation of mental, physical and sexual developments. potbelly, protruding tongue, dry skin etc are also indicative of this disease.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

9 3962
Q:

The main use of salt in the diet is to

the_main_use_of_salt_in_the_diet_is_to1552126680.jpg image

A) produce in small amounts the hydrochloric acid required for the digestion of food B) increase the solubility of food particles in water
C) make the taste of food better D) ease the process of cooking
 
Answer & Explanation Answer: A) produce in small amounts the hydrochloric acid required for the digestion of food

Explanation:

The main use of salt in the diet is to produce in small amounts the hydrochloric acid required for the digestion of food.

Report Error

View Answer Report Error Discuss

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

2 3961
Q:

Who was appointed as Director General of Goods and Service Tax Intelligence (DG GSTI) ?

A) Uttam Singh B) Gurindar Chadha
C) Richard Verma D) John Joseph
 
Answer & Explanation Answer: D) John Joseph

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk

10 3961
Q:

Who Invented The World Wide Web ?

A) Sir Timothy John B) Earle Dickson
C) James Rineose D) Laszlo Jozsef Biro
 
Answer & Explanation Answer: A) Sir Timothy John

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions

0 3961
Q:

Train A, travelling at 84 kmph, overtook train B, traveling in the same direction, in 10 seconds. If train B had been traveling at twice its speed, then train A would have taken 22.5 seconds to overtake it. Find the length of train B, given that it is half the length of train A.

A) 180 m B) 100 m
C) 200 m D) 150 m
 
Answer & Explanation Answer:

Explanation:

Let speed of train B be x m/s And length of train B be y m
Then length of train A is 2y m
Speed of train A = 84 × 5/18 = 210/9 m/s = 70/3 m/s
A.T.Q, (2y+y)/10 = 70/3 − x .............(i)
and (2y+y)/ 22.5 = 70/3 − 2x ................(ii)
solving (i) and (ii), y = 50 m

Report Error

View Answer Report Error Discuss

0 3961
Q:

Who amongst the following is the author of the book ' Freedom from Fear '

A) Nelson Mandela B) Aung San Suukyi
C) Taslima Nasreen D) Benazir Bhutto
 
Answer & Explanation Answer: B) Aung San Suukyi

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

10 3960