main()
{
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++) {
printf(" %d ",*c);
++q; }
for(j=0;j<5;j++){
printf(" %d ",*p);
++p; }
}
Answer / susie
Answer :
2 2 2 2 2 2 3 4 6 5
Explanation:
Initially pointer c is assigned to both p and q.
In the first loop, since only q is incremented and not c ,
the value 2 will be printed 5 times. In second loop p itself
is incremented. So the values 2 3 4 6 5 will be printed.
Is This Answer Correct ? | 46 Yes | 9 No |
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
Is it possible to type a name in command line without ant quotes?
Write a program to model an exploding firecracker in the xy plane using a particle system
write a program in c to merge two array
why is printf("%d %d %d",i++,--i,i--);
To reverse an entire text file into another text file.... get d file names in cmd line
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }