void main()
{
int x,y=2,z;
z=(z*=2)+(x=y=z);
printf("%d",z);
}
Answers were Sorted based on User's Feedback
Answer / sanjay bk
8400,8521, when you run program then program giving output is different different answer.
| Is This Answer Correct ? | 2 Yes | 2 No |
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }
plz send me all data structure related programs
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
String copy logic in one line.
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() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
String reverse with time complexity of n/2 with out using temporary variable.
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }