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

How many Months of the year have 28 Days?

A) 12 B) 7
C) 5 D) 6
 
Answer & Explanation Answer: A) 12

Explanation:

We have 12 months.

In every month we get 28 or more days. 

So that implies we get 28 days in each and every month.

 

Report Error

View Answer Report Error Discuss

Filed Under: Logic Puzzles
Exam Prep: TOEFL , GRE , GATE , CAT , Bank Exams , AIEEE
Job Role: IT Trainer , Database Administration , Bank PO , Analyst

8 4815
Q:

' The Nacked Face ', a very popular book is written by

A) John Milton B) Dominique Lapierre
C) Juan Benet D) Sidney Sheldon
 
Answer & Explanation Answer: D) Sidney Sheldon

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

7 4814
Q:

Earlist thermometerr was developed by

A) Celsius B) Fahrenheit
C) Kelvin D) Galileo
 
Answer & Explanation Answer: D) Galileo

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

5 4814
Q:

Why address bus in unidirectional and data bus is bidirectional?

Answer

Because there is no need address traansaction between processor and peripheral device but data bus is needed because data has to be read and write

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

3 4813
Q:

Who governs the INTERNET ?

A) ISOC B) IETF
C) IAB D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer

9 4812
Q:

Which is the oldest tennis tournament in the world and also prestigious?

A) Wimbledon B) US Open
C) French Open D) Australian Open
 
Answer & Explanation Answer: A) Wimbledon

Explanation:

Wimbledon Tournament in the city London, is the prestigious and the oldest tournament in the world.

Report Error

View Answer Report Error Discuss

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

4 4811
Q:

Bind it and it walks, Loose it and it stops. What is it?

Answer

A Sandal.


It has sticking strips to make them fit for our feet. If you bind them only you can start walking or other wise it comes out.

Report Error

View answer Workspace Report Error Discuss

7 4811