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 |
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
main() { show(); } void show() { printf("I'm the greatest"); }
#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
main() { char a[4]="HELL"; printf("%s",a); }
Finding a number which was log of base 2