String copy logic in one line.
Answers were Sorted based on User's Feedback
how to return a multiple value from a function?
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
main() { int i=5; printf("%d",++i++); }
void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
void main() { int i=5; printf("%d",i+++++i); }
main() { extern out; printf("%d", out); } int out=100;