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 |
how to print this sereis 2 4 3 6 5..........?
Distinguish between actual and formal arguments.
Explain can the sizeof operator be used to tell the size of an array passed to a function?
#include<std.h> int main() { char *str[]={"Frogs","Do","Not","Die","They","Croak!"}; printf("%d %d\n",sizeof(str),strlen(str)); ...return 0; } what will the output of the above program?
What is a constant?
print 1-50 with two loop & two print Statement
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3)); }
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is meant by keywords in c?
why integer range between -327680to+32767