main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answer Posted / manil shrama
hello all..........
here malloc function reserves a memory space for an integer,whose adddess is pointed by integer pointer p.
Now at this memory space,4 istored by using *p = 4
(*p)+++means,*p=*p+2, (4+2=6)
and ptr++ means,*ptr=*ptr+1, (4+1=5)
now 4*5=30 is required answer
k bye.....tc
Is This Answer Correct ? | 6 Yes | 49 No |
Post New Answer View All Answers
Write a program to print all permutations of a given string.
How do we declare variables in c?
What does 2n 4c mean?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What is huge pointer in c?
hi, which software companys will take,if d candidate's % is jst 55%?
What is function and its example?
What is the size of structure pointer in c?
Explain function?
What is the use of clrscr?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
In C language what is a 'dangling pointer'?
Explain what are the different file extensions involved when programming in c?
Wt are the Buses in C Language
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....