-
-
-
-
printf("Address of j=%un",&j);
printf("Address of k=%un",&k);
return 0;
}
Suppose the answer is:
Address of i=2004
Address of j=2002
Address of k=2000
why is the address decreasing ?">Consider the following program:#includemain(){int i=3;int *j;int **k;j=&i;k=&j;printf("Address of i=%un",&i);printf("Address of j=%un",&j);printf("Address of k=%un",&k);return 0;}Suppose the answer is:Address of i=2004Address of j=2002Address of k=2000why is the address decreasing ?
-
-
-
-
puts (wer):
1. prints the string 8 8 8
2. prints the null string
3. prints the string m, n, b
4. none of these
">The following program fragment int m=n=b=8; char wer[80]; sprintf(wer, "%d%d%d", m, n, b,); puts (wer): 1. prints the string 8 8 8 2. prints the null string 3. prints the string m, n, b 4. none of these
-
-
-
}
">Vi) main(){ extern int i; i=20;printf("%d",i);}
Linker Error : Undefined symbol '_i'Explanation: extern storage class in the following declaration, extern int i;specifies to the compiler that the memory for i is allocated in some other program and that address will be given to the current program at the time of linking. But linker finds that no other variable of name i is available in any other program with...
-
-
-
-
-
-
If the following program (myprog) is run from the command line as myprog monday tuesday wednesday thursday What would be the output? main(int argc, char *argv[]) { while(--argc >0) printf("%s",*++argv); }
A) myprog monday tuesday wednesday thursdayB) monday tuesday wednesday thursdayC) mondaytuesdaywednesdaythursdayD) myprog tuesday thursday
-
According to ANSI specifications which is the correct way of declaring main() when it receives command line arguments?
A) main(int argc, char *argv[]) B) main(argc,argv) int argc; char *argv[];C) main() {int argc; char *argv[]; }D) None of the above
-
-
C Interview Questions
Ans