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


Please Help Members By Posting Answers For Below Questions

Write a program to print all permutations of a given string.

638


How do we declare variables in c?

561


What does 2n 4c mean?

710


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

612


What is huge pointer in c?

577






hi, which software companys will take,if d candidate's % is jst 55%?

1659


What is function and its example?

621


What is the size of structure pointer in c?

610


Explain function?

660


What is the use of clrscr?

589


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

1406


In C language what is a 'dangling pointer'?

632


Explain what are the different file extensions involved when programming in c?

629


Wt are the Buses in C Language

2749


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!+....

22198