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

In December 2017, which Ministry launched a pilot project ‘Blue Flag’?

 

A) Ministry of Home Affairs B) Ministry of Health and Family Welfare
C) Ministry of Environment, Forest and Climate change D) Ministry of Tourism
 
Answer & Explanation Answer: C) Ministry of Environment, Forest and Climate change

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

0 4087
Q:

Pulitzer prize winners are selected by the Pulitzer prize Board and announced by the president of the

A) New York University B) Columbia University
C) Wesleyan University D) Cambridge university
 
Answer & Explanation Answer: B) Columbia University

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

1 4086
Q:

A particle which is four times in mass and two times in charge that of proton is

A) helium atom B) an alpha particle
C) deuteron D) tritium
 
Answer & Explanation Answer: B) an alpha particle

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

7 4086
Q:

A column defined as UNIQUE can contain Nulls while a column defined as PRIMARY KEY can't contain Nulls

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

Because a table can have only one primary key

Report Error

View Answer Workspace Report Error Discuss

1 4083
Q:

Oscar Awards are conferred annually by

A) Academy of Motion Pictures, arts and sciences, USA B) Hollywood Foreign Press Association
C) Government of United States D) None
 
Answer & Explanation Answer: A) Academy of Motion Pictures, arts and sciences, USA

Explanation:
Report Error

View Answer Report Error Discuss

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

4 4080
Q:

The medieval Indian Muslim poet, historian and musician who called himself a parrot of India was

A) Mulla Daud B) Malik Muhammad Jayasi
C) Tansen D) Amir Khusrau
 
Answer & Explanation Answer: D) Amir Khusrau

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

2 4078
Q:

Rearrange the parts of the sentence in correct order.

There must be more oversight

P-which this is done
Q-and much more accountability
R-in the manner in

 

A) RQP B) QRP
C) PRQ D) PQR
 
Answer & Explanation Answer: B) QRP

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 4077