main()
{
extern int i;
i=20;
printf("%d",sizeof(i));
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Linker error: undefined symbol '_i'.
Explanation:
extern declaration specifies that the variable i is defined
somewhere else. The compiler passes the external variable to
be resolved by the linker. So compiler doesn't find an
error. During linking the linker searches for the definition
of i. Since it is not found the linker flags an error.
Is This Answer Correct ? | 22 Yes | 4 No |
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
How we print the table of 3 using for loop in c programing?
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
All the combinations of prime numbers whose sum gives 32
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4