Page 1 of 1

2. Write the output of the following functions with proper reasons. You will get marks only if you have given a proper r

Posted: Tue Jul 12, 2022 8:04 am
by answerhappygod
2 Write The Output Of The Following Functions With Proper Reasons You Will Get Marks Only If You Have Given A Proper R 1
2 Write The Output Of The Following Functions With Proper Reasons You Will Get Marks Only If You Have Given A Proper R 1 (177.2 KiB) Viewed 105 times
2 Write The Output Of The Following Functions With Proper Reasons You Will Get Marks Only If You Have Given A Proper R 2
2 Write The Output Of The Following Functions With Proper Reasons You Will Get Marks Only If You Have Given A Proper R 2 (192.15 KiB) Viewed 105 times
2 Write The Output Of The Following Functions With Proper Reasons You Will Get Marks Only If You Have Given A Proper R 3
2 Write The Output Of The Following Functions With Proper Reasons You Will Get Marks Only If You Have Given A Proper R 3 (188.43 KiB) Viewed 105 times
2. Write the output of the following functions with proper reasons. You will get marks only if you have given a proper reason for your [10x2] answer: void foo() { int m=10,*n; void *p; n=p=&m; printf("%u, %u",n++,p++); void foo() { int a[]={0, 4, 3, 4}; int *p, k,i; for(p=a+3,i=0;i<4;i++) printf("%d",p[-i]); }
void foo() { char a[] = "NITJ"; char b[] = "NITJ"; if (a == b) printf("Same"); printf("Different"); else } void main() { int i; printf("NITJ\n"); for(i=0;i<5;i++) main(); } void fun(char *m) { if(*m && *m != '') { fun(a+1); putchar(*m); void main() { int x,y,z, x=y=z= -1; z = ++x || ++y && ++z; printf("x-%d,y=%d,z-%d",x,y,z); } void foo() { char s[5]="abcd", *k; k=s+1; *k='0'; printf("%s",s); } void foo(int a, int b) { if(b!=1) if(a!= 1) { printf("NITJ"); foo(a/2,b); } Input: NIT Jalandhar (It will be else given) { b--; foo(1024,b); } } Question: Compute the number of times NITJ will be printed where a and b are 1024 and 512, respectively.
void foo { int arr[] = {0,1,2}; int *p[]={arr,arr+1,arr+2}; int **k; k = p; **k+t: printf("%d,%d,%d\n",k-p,*k- a, **k); *++*k: printf("%d,%d,%d\n",k-p,*k- a,**k); ++**k: printf("%d,%d,%d\n",k-p,*k- a,**k); } void main() int var 10; if(var & 8 = 8) printf("Fire"); printf("Water"); else }