Questions

Q:

How would you dynamically allocate a 2-D array of integers?

Answer

#include "alloc.h"


#define MAXROW 3


#define MAXcol 4


main()


{


        int *p, i, J;


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


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


         {


                for (j=0; j < MAXCOL ; j++)


                { 


                      p [ i * MAXCOL + j] = i;


                       printf ( "%d", p [i * MAXCOL + j] );


                 }


                  printf ("\n");


          }


}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 3240
Q:

President Pranab Mukherjee inaugurated the biggest river festival of India in 2017, Namami Brahmaputra, in which of the following states ?

A) Arunachal Pradesh B) Assam
C) Orissa D) Tripura
 
Answer & Explanation Answer: B) Assam

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

3 3239
Q:

Lens is made up of which glass

A) Ordinary glass B) Pyrex glass
C) Flint glass D) Cobalt glass
 
Answer & Explanation Answer: C) Flint glass

Explanation:
Report Error

View Answer Report Error Discuss

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

9 3238
Q:

March 21 is observed as.......

A) World Environment Day B) World Forestry Day
C) World Greenary Day D) None of these
 
Answer & Explanation Answer: B) World Forestry Day

Explanation:
Report Error

View Answer Report Error Discuss

1 3238
Q:

Who among the following has been awarded the Arjuna award 2017 for his contribution to hockey?

 

A) S.V. Sunil B) P.A. Rafel
C) Sardar Singh D) Vikram Negi
 
Answer & Explanation Answer: A) S.V. Sunil

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards
Exam Prep: Bank Exams

0 3237
Q:

Which sector of Indian Economy has shown remarkable expansion during the last decade

A) Primary sector B) Secondary sector
C) Terrrtiary sector D) Mining sector
 
Answer & Explanation Answer: C) Terrrtiary sector

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

2 3237
Q:

Both food and air travel through the

A) pharynx B) trachea
C) larynx D) alveolus
 
Answer & Explanation Answer: A) pharynx

Explanation:

The pharynx is a passageway shared by both food and air.

 

Both_food_and_air_travel_through_the1562568925.png image

Report Error

View Answer Report Error Discuss

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

5 3237
Q:

Ozone hole refers to

A) Decrease in the thickness of ozone layer in Stratosphere B) Increase in thickness of ozone layer
C) Decrease in the ozone layer in Troposphere D) Hole in the ozone layer
 
Answer & Explanation Answer: A) Decrease in the thickness of ozone layer in Stratosphere

Explanation:
Report Error

View Answer Report Error Discuss

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

8 3236