Recent questions tagged programming-in-c

0 votes
1 answer
541
For creating a N integer arrayis there any mistake in this line?int numArray[N]=(int *) malloc(N);
0 votes
1 answer
543
void f(int x,int &y,const int &z){x+=z; y+=z;}int main(){ int a=22,b=33,c=44; f(a,b,c); f(2*a-3,b,c); printf("a=%d b=%d c=%d",a,b,c); return 0;}
1 votes
0 answers
544
void find(int x){ static int i=10,y=0; y=y+i; for(i;i>0;i=i-10){ if(x!=0) find(x-1); else{ printf("%d",y); } } }What will be output printed for find(4)?
2 votes
0 answers
546
What will be output of the program?int d=0; int f(int a,int b){ int c; d++; if(b==3) return a*a*a; else{ c=f(a,b/3); return(c*c*c); } } int main(){ printf("%d",f(4,81)); ...
0 votes
1 answer
547
void print(int i){ static int x=4; if(i!=0){ print( x); } printf("%d",x); }What will be output printed for print(10)?Will it print value as call by value or call by refer...
1 votes
2 answers
549
Tell me the difference :&(arr+1) and &arr+1
0 votes
0 answers
550
1 votes
1 answer
551
#include <stdio.h int main() { int a = 1; char d[] = "ab"; printf("%d", sizeof(a+d)); return 0; }Explain the Output
0 votes
1 answer
552
#include <stdio.h #define foo(m,n) "m n" int main() { char x='k',y='l'; printf("%s",foo(x,y)); return 0; }OutputPlease explain why the output is m n instead of k l
2 votes
0 answers
556
What will be the final output : #include <stdio.h int r(){ static int num=7; return num ; } int main(){ for(r();r();r()) { printf("%d ",r()); } return 0; } A)63 B)41 C)52...
14 votes
6 answers
558
18 votes
2 answers
561
0 votes
1 answer
562
is it dangling pointer ?int main(void) { int* p;printf("%d",*p); return 0;} https://ideone.com/IN77el
4 votes
3 answers
564
2 votes
0 answers
567
void foo(int n) { for(i1=1;i1<=n;i1++) { for(i2=1;i2<=i1;i2++) { ....... { for(i6=1;i6<=i5;i6++) { count++; } } } } }Count initially 0.What is value returned by foo(8)?