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 4104
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 4100
Q:

Which of the statements given below are correct?

A) Rajiv Ouseph won the Badminton 2017 BWF Super Series Finals Men's Singles.

B) In 2017, Anthony Davis played for the NBA team New Orleans Pelicans.

C) Lewis Hamilton won the Formula One 2017 Australian Grand Prix.

 

A) Only A B) Only B
C) Only C D) B and C
 
Answer & Explanation Answer: B) Only B

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports
Exam Prep: Bank Exams

1 4100
Q:

The Union Cabinet has approved the export of which missile system of India?

 

A) Nag B) Amogha
C) Akash D) Prithvi
 
Answer & Explanation Answer: C) Akash

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

2 4100
Q:

Which of the statements given below are correct?

A) Netherlands won the 2017 Women's Cricket World Cup.

B) Australia won the 2016–17 Men's FIH Hockey World League Final.

C) Fan Zhendong won the Tennis 2017 US Open Men's Singles.

 

A) Only B B) Only C
C) Both B and C D) A, B and C
 
Answer & Explanation Answer: A) Only B

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports
Exam Prep: Bank Exams

0 4099
Q:

The substrate of photorespiration is

A) Glucose B) Pyruvic acid
C) Glycolate D) Sucrose
 
Answer & Explanation Answer: C) Glycolate

Explanation:
Report Error

View Answer Report Error Discuss

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

5 4099
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 4099
Q:

RBI has recently allowed minors to open and operate savings bank accounts  independently. The minor should be above  how many years of age?

A) 9 B) 10
C) 12 D) 14
 
Answer & Explanation Answer: B) 10

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

3 4098