#define a 10
int main()
{
printf("%d..",a);
foo();
printf("%d..",a);
return 0;
}
void foo()
{
#undef a
#define a 50
}
Answers were Sorted based on User's Feedback
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
What is the hidden bug with the following statement? assert(val++ != 0);
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(ā%dā,k); }
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!
35 Answers Tata Elxsi, TCS, VI eTrans,
void main() { int i=5; printf("%d",i++ + ++i); }
How can you relate the function with the structure? Explain with an appropriate example.