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 |
Develop a routine to reflect an object about an arbitrarily selected plane
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
String reverse with time complexity of n/2 with out using temporary variable.
main() { extern int i; i=20; printf("%d",i); }
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
main() { printf("%d", out); } int out=100;
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
WAP to display 1,2,3,4,5........N
find simple interest & compund interest