void main()
{
int *mptr, *cptr;
mptr = (int*)malloc(sizeof(int));
printf(“%d”,*mptr);
int *cptr = (int*)calloc(sizeof(int),1);
printf(“%d”,*cptr);
}
Answer / susie
Answer :
garbage-value 0
Explanation:
The memory space allocated by malloc is uninitialized,
whereas calloc returns the allocated memory space
initialized to zeros.
| Is This Answer Correct ? | 2 Yes | 1 No |
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { int a[10]; printf("%d",*a+1-*a+3); }
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;
write a c program to Reverse a given string using string function and also without string function
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
String reverse with time complexity of n/2 with out using temporary variable.
how to return a multiple value from a function?
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.