Questions

Q:

Can I increase the size of a dynamically allocated array? < Yes / No> if yes, how?

Answer

Yes, using the realloc() function as shown below:


main()


{


        int *p;


        p = ( int *) malloc (20) ;


        t = p;


        t = (int *) realloc ( p, 40);


        if ( t == NULL )


        Printf (" Cannot reallocate, leaves previous allocated region unchanged ");


       else


       {


              if ( p ==t )


              ;  / * the array expanded at the same region */


             else


            { 


                 free ( p ); / * deallocate the original array */


                 p = t;  /* set p to newly allocated region */


             }


      }


}  

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 5193
Q:

India became a member of the United Nations in

A) 1945 B) 1947
C) 1949 D) 1950
 
Answer & Explanation Answer: A) 1945

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

6 5193
Q:

Rolling friction is caused by ____ from the following?

A) Non-elastic effects B) Gravity
C) Power dissipation D) Buoyancy
 
Answer & Explanation Answer: A) Non-elastic effects

Explanation:

Rolling friction or rolling drag is the force resisting the motion when a body rolls on a surface. It is mainly caused by non-elastic effects, that is, not all the energy needed for deformation of the wheel, roadbed, etc... is recovered when the pressure is removed.

Another cause of rolling resistance lies in the slippage between the wheel and the surface, which dissipates energy.

Report Error

View Answer Report Error Discuss

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

10 5192
Q:

National Institute of Nutrition is located at which of the following places?

A) Pune B) Bangalore
C) Mumbai D) Hyderabad
 
Answer & Explanation Answer: D) Hyderabad

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Places

14 5189
Q:

Which of the following is the name Pierre Cardin associated with?

A) Painting B) Sports
C) Fashion Designing D) Music
 
Answer & Explanation Answer: C) Fashion Designing

Explanation:

It belongs to the field of Fashion Designing

Report Error

View Answer Report Error Discuss

Filed Under: Indian Culture

73 5188
Q:

Who Discovered The Nucleus of a Cell?

A) Otto Hahn B) John Dalton
C) Robert Brown D) Marie Curie
 
Answer & Explanation Answer: C) Robert Brown

Explanation:

Robert Brown, Scottish botanist, Discovered The Nucleus of a Cell in 1831, London. When Brown was studying orchids under microscope when he observed an opaque area, which he called the "Areola" or "Nucleus", in the cells of the flower's outer layer.

The nucleus was also described by Franz Bauer in 1804 but in detail Robert Brown made it in 1831.

Report Error

View Answer Report Error Discuss

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

11 5186
Q:

Who was the first ruler to consolidate the slavic tribes?

A) Alter Ego B) Rurik
C) John Adams D) None of the above
 
Answer & Explanation Answer: B) Rurik

Explanation:

In the history, Rurik was believed to be the first ruler to consolidate the slavic tribes. He was a Russian leader in the 9th century.

who_was_the_first_ruler_to_consolidate_the_slavic_tribes1552454728.jpg image

Report Error

View Answer Report Error Discuss

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

1 5185
Q:

Provisions regarding Municipalities and Panchayats was made in the Indian Constitution in which year?

A) 1991 B) 1993
C) 1995 D) 2000
 
Answer & Explanation Answer: B) 1993

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

7 5184