Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Which one of the following statements allocates enough space to hold an array of 10 integers that are initialized to 0 ?
b) int *ptr = (int *) alloc( 10*sizeof(int));
c) int *ptr = (int *) malloc( 10*sizeof(int));
d) int *ptr = (int *)calloc(10*sizeof(int));
Answered by Ragini rani on 2005-05-13 09:01:56: a is the correct ans Calloc allocates space and initialized them to 0
Related Answered Questions
Related Open Questions