main()
{
extern int i;
i=20;
printf("%d",i);
}
Answer / susie
Answer :
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 memory space allocated for it. Hence a linker
error has occurred .
| Is This Answer Correct ? | 28 Yes | 3 No |
Is it possible to type a name in command line without ant quotes?
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
how to check whether a linked list is circular.
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
write a program to Insert in a sorted list
main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
How to access command-line arguments?
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
why the range of an unsigned integer is double almost than the signed integer.