Recent questions tagged programming-in-c

0 votes
1 answer
661
#define cube(x) x*x*xmain(){int a=3,b;b=cube(a++);printf("% d % d",a,b);}
0 votes
0 answers
663
0 votes
1 answer
666
0 votes
0 answers
667
0 votes
1 answer
669
0 votes
1 answer
670
Is it static declaration or static assignment?int main() { int x=20; static int y=x; if(x==y) printf("Equal"); else printf("Not Equal"); return 0; }What is output?and why...
0 votes
0 answers
675
0 votes
1 answer
676
Predict the Output for both the snippets for the following:1. Call by Value2. Call by Reference3. Call by Need4. Call by Name5. Call by value Result/Call by value Return(...
0 votes
0 answers
677
int main() { int x = -4; unsigned char z = 10; if (x z) printf("x>z\n"); else printf("x<z\n"); return 0; }
1 votes
0 answers
678
what is the result of comparing signed with unsigned number??#include <stdio.h>int main(){ unsigned int a = 5;if(a -1)printf("5 is -1\n"); return 0; }
0 votes
0 answers
679
Can anyone please explain the functioning of the statement (specified in bold) ?#include <stdio.h>void main(){int p = -8;int i = (p++, ++p);printf("%d\n", i);}
0 votes
1 answer
681
#include<stdio.h void fun(int *p,int *q) { p=q; *p=q; } int i=0,j=1; int main() { fun(&i,&j); printf("%d%d",i,j); }What will be the output of i and j in 16-bit C Compiler...
0 votes
0 answers
682
0 votes
0 answers
683
output of the following C code is:int main() { int a=520; char *ptr; ptr=(char *)&a; printf("%d",*ptr); return 0; }Assume that values are stored in little-endia...
0 votes
0 answers
684
0 votes
1 answer
685
2 votes
0 answers
687
What is the Output of following Array ? A. 8 10B. 10 8C. 10 2D. 8 1E. Garbage value
0 votes
1 answer
688
Void Test (int arr[], int s, int e) { int temp; if(s >= e) return; temp = arr[s+1]; arr[s+1] = arr[e]; arr[e] = temp; Test(arr, s+1, e - 1) }
3 votes
1 answer
689
#include<stdio.h #define type int type foo(type b) { return b*b; } #undef type #define type float int main() { float a = foo(1.1); printf("%1.2f", a); } Please explain li...
1 votes
0 answers
690