what would be the output of the following program
main()
{
int a[] = {1,2,3,4,5};
int *ptr = {a,a+1,a+2,a+3,a+4};
printf("%d %d %d %d",a,*ptr,**ptr,ptr);
}
}
Output:
1.Base address of 'a'
2.Base address of 'a' (Since ptr holds address of the array 'a')
3.Value at the base address of 'a' ie., 1
4.Base address of array of pointers ie., address of 'ptr'
The above answer is valid provided the initialisation of *ptr
should be a array of pointers.
ie., initialisation should be int *ptr[]=
{a,a+1,a+2,a+3,a+4};
Otherwise it leads to compilation error
Is This Answer Correct ? | 0 Yes | 0 No |
Describe the difference between = and == symbols in c programming?
34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?
what is ans for this scanf(%%d",c);
What is the significance of c program algorithms?
Explain what is wrong with this program statement? Void = 10;
Write a program to compute the following 1!+2!+...n!
what is foreign key in c language?
what is the difference between #include<stdio.h> and #include "stdio.h" ?
what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??
What is hashing in c language?
Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001
Why isn't any of this standardized in c? Any real program has to do some of these things.