Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged output
1
votes
2
answers
181
C programming
#include <stdio.h> int main() { //code int x; printf("%d",printf("A")+printf("BC")*printf("DEF")); return 0; } What should be the output of following program? Please explain the concept behind this.
#include <stdio.h int main() { //code int x; printf("%d",printf("A")+printf("BC")*printf("DEF")); return 0; }What should be the output of following program? Please explai...
Jayant Isswani
910
views
Jayant Isswani
asked
Apr 9, 2018
Programming in C
programming-in-c
output
programming
+
–
3
votes
4
answers
182
Programming - pointer
Assume sizeof an integer and a pointer is 4 byte. Output? #include<stdio.h> #define R 10 #define C 20 int main() { int *p[R][C]; printf("%d",sizeof(*p)); printf("%d",sizeof(p)); return 0; }
Assume sizeof an integer and a pointer is 4 byte. Output?#include<stdio.h #define R 10 #define C 20 int main() { int *p[R][C]; printf("%d",sizeof(*p)); printf("%d",sizeof...
Ahsanul Hoque
4.4k
views
Ahsanul Hoque
asked
Apr 5, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
1
answer
183
Doubt in C-programming
The Correct answer is c but how? int main() { int a=210,b=120,c; c=a>b?1,2,3:2,5,6,7; printf("%d",c); } ans:- a) 1 b) 2 c) 3 d) Error.
The Correct answer is c but how?int main(){ int a=210,b=120,c; c=a>b?1,2,3:2,5,6,7; printf("%d",c);}ans:-a) 1b) 2c) 3d) Error.
dixit bishwash
1.2k
views
dixit bishwash
asked
Mar 31, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
1
answer
184
C Programming
#include<stdio.h> typedef int ARRAY[10][10]; int main() { ARRAY arr[2]; printf("Size is %d",sizeof(arr)); } The program on running produces output Size is $800$ I know typedef is used for providing alternate names to existing datatypes. Can someone explain what's happening? Or correct me
#include<stdio.h typedef int ARRAY[10][10]; int main() { ARRAY arr ; printf("Size is %d",sizeof(arr)); } The program on running produces output Size is $800$I know typede...
gauravkc
304
views
gauravkc
asked
Mar 26, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
0
answers
185
Output of the Program
#include<stdio.h> int fun1(int x) { x=14; } int fun2(int x) { x=20; } int main() { int(*p)(),m,n; scanf("%d",&m); if(m) p=fun1; else p=fun2; n=(*p)(); printf("%d",n); return 0; } Suppose input given 0
#include<stdio.h int fun1(int x) { x=14; } int fun2(int x) { x=20; } int main() { int(*p)(),m,n; scanf("%d",&m); if(m) p=fun1; else p=fun2; n=(*p)(); printf("%d",n); retu...
srestha
604
views
srestha
asked
Mar 7, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
0
answers
186
Output of the program
#include<stdio.h> int main() { char a[]={'A','B','C','D'}; char *p=&a[0]; *p++; printf("%c%c",*++p,--*p); } What will be the output? 1)C B 2)B B 3)B A 4)C A
#include<stdio.h int main() { char a[]={'A','B','C','D'}; char *p=&a[0]; *p++; printf("%c%c",*++p, *p); }What will be the output?1)C B2)B B3)B A4)C A
srestha
404
views
srestha
asked
Mar 6, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
1
answer
187
C programming
#include<stdio.h> int main() { printf("%d\n",1==5==5); printf("%d\n",1==5!=5); printf("%d\n",1!=5!=5); printf("%d\n",1!=5==5); return 0; } What is the output?
#include<stdio.h int main() { printf("%d\n",1==5==5); printf("%d\n",1==5!=5); printf("%d\n",1!=5!=5); printf("%d\n",1!=5==5); return 0; }What is the output?
Lakshman Bhaiya
501
views
Lakshman Bhaiya
asked
Mar 1, 2018
Programming in C
programming-in-c
output
+
–
0
votes
3
answers
188
C programming
main ( ) { int a = 2, b, c; a* = b = c = 4; a = b = c; printf(“%d”, a); a = = (b = c); printf(“%d”, a); } What will be the output? And How. $1, 4$ $4, 4$ $1, 1$ $ 8, 1$
main ( ) { int a = 2, b, c; a* = b = c = 4; a = b = c; printf(“%d”, a); a = = (b = c); printf(“%d”, a); } What will be the output? And How.$1, 4$$4, 4$$1, 1$$ 8, ...
Ahsanul Hoque
768
views
Ahsanul Hoque
asked
Feb 24, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
1
answer
189
techtud programming
Answer is C . But i want to know what is segmentation fault?
Answer is C . But i want to know what is segmentation fault?
Moin Mukhtar
418
views
Moin Mukhtar
asked
Feb 12, 2018
Programming in C
programming-in-c
output
+
–
0
votes
2
answers
190
CMI2017-A-07
Consider the following functions f() and g(). f(){ g(){ w=5; z=w+1; w=2*z+2; z=3*z-w; } print(z); } We start with $w$ and $z$ set to $0$ and execute $f()$ and $g()$ in parallel—that is, at each step we either execute one statement from $f()$ or one statement from $g()$. Which of the following is not a possible value printed by $g()$ ? $-2$ $-1$ $2$ $4$
Consider the following functions f() and g(). f(){ g(){ w=5; z=w+1; w=2*z+2; z=3*z-w; } print(z); }We start with $w$ and $z$ set to $0$ and execute $f()$ and $g()$ in par...
Tesla!
588
views
Tesla!
asked
Feb 4, 2018
Programming in C
cmi2017
programming
output
+
–
1
votes
3
answers
191
CMI2017-A-06
What does the following function compute in terms of $n$ and $d$, for integer values of $d$ ? Note that the operation $/$ denotes floating point division, even if the arguments are both integers. function foo(n,d){ if (d == 0){ return 1; }else{ if (d < 0){ return foo(n,d+1)/n; ... values of $d$. $n \times d$ if $d>0$ ,$n\div d$ if $d<0$. $n \times d$ for all the values of $d$.
What does the following function compute in terms of $n$ and $d$, for integer values of $d$ ? Note that the operation $/$ denotes floating point division, even if the arg...
Tesla!
708
views
Tesla!
asked
Feb 4, 2018
Programming in C
cmi2017
programming
output
+
–
2
votes
1
answer
192
please explain me
Why printf("%d",5%-2); is 1, not -1.
Why printf("%d",5%-2); is 1, not -1.
Akshay Nair
567
views
Akshay Nair
asked
Jan 29, 2018
Programming in C
programming
output
+
–
1
votes
0
answers
193
please explain me the third output
What is the output of the following program? void main() { printf("%d",5%2); printf("%d",-5%2); printf("%d",5%-2); printf("%d",-5%-2); printf("%d",2%5); } A) 1,-1 -1 1 0 B)1 -1 1 -1 0 c)1 -1 -1 -1 0 d)1 -1 -1 1 2
What is the output of the following program?void main(){printf("%d",5%2);printf("%d",-5%2);printf("%d",5%-2);printf("%d",-5%-2);printf("%d",2%5);}A) 1,-1 -1 1 0B)1 -1 1 -...
Akshay Nair
440
views
Akshay Nair
asked
Jan 29, 2018
Programming in C
programming
programming-in-c
output
+
–
1
votes
0
answers
194
output = 514 how
main() { int a ; char *x; x = ( char *)&a; a = 512 ; x[0] = 2 ; x[1] = 2 ; printf("%d",a); }
main(){ int a ;char *x;x = ( char *)&a;a = 512 ;x[0] = 2 ;x = 2 ;printf("%d",a);}
sumit goyal 1
320
views
sumit goyal 1
asked
Jan 26, 2018
Programming in C
output
programming
pointers
+
–
2
votes
0
answers
195
Programming Question
Find the output printed by this program. Pls. Explain the Execution of this program in detail. Thanks
Find the output printed by this program.Pls. Explain the Execution of this program in detail.Thanks
yogi_p
1.1k
views
yogi_p
asked
Jan 22, 2018
Programming in C
programming-in-c
programming
output
+
–
2
votes
2
answers
196
Algorithm - Extern Variable
extern int i; int i = 10; i = 5; int main() { printf("%d", i); return 0; } The output for the above code is _______
extern int i; int i = 10; i = 5; int main() { printf("%d", i); return 0; }The output for the above code is _______
targate2018
1.4k
views
targate2018
asked
Jan 15, 2018
Programming in C
programming-in-c
extern-variable
output
+
–
2
votes
0
answers
197
Programming Question
thepeeyoosh
593
views
thepeeyoosh
asked
Jan 14, 2018
Programming in C
programming-in-c
programming
output
+
–
1
votes
1
answer
198
Programming
Output is? With explanation
Output is? With explanation
Harikesh Kumar
288
views
Harikesh Kumar
asked
Jan 14, 2018
Programming in C
programming-in-c
programming
cpp
java
output
+
–
2
votes
1
answer
199
Programming
Explain the answer.
Explain the answer.
Harikesh Kumar
314
views
Harikesh Kumar
asked
Jan 14, 2018
Programming in C
programming-in-c
java
cpp
output
programming
+
–
1
votes
0
answers
200
Programming
What is the correct Answer ? My answer is 90 and given answer is no output how?
What is the correct Answer ?My answer is 90 and given answer is no output how?
Harikesh Kumar
345
views
Harikesh Kumar
asked
Jan 14, 2018
Programming in C
programming-in-c
programming
java
cpp
output
+
–
1
votes
1
answer
201
Cpp programming
please explain it in detail ....and how we write this code for if else rule
please explain it in detail ....and how we write this code for if else rule
Harikesh Kumar
346
views
Harikesh Kumar
asked
Jan 13, 2018
Programming in C
programming
output
+
–
0
votes
0
answers
202
C progarmming
#include <stdio.h> int main(void) { int i = 0; char ch; while(1) { ch= *("hello world" + i); if(ch == '\0') break; putchar(ch); i++; } return 0; } What does ch= *("hello world" + i); do?
#include <stdio.h int main(void) { int i = 0; char ch; while(1) { ch= *("hello world" + i); if(ch == '\0') break; putchar(ch); i++; } return 0; }What does ch= *("hello w...
Abhishek Kumar Singh
556
views
Abhishek Kumar Singh
asked
Dec 30, 2017
Programming in C
programming-in-c
output
programming
+
–
0
votes
0
answers
203
c o/p
what is the o/p? int main() { char inchar = 'A'; switch (inchar) { case 'A' : printf ("choice A \n") ; case 'B' : { printf ("choice B") ; break; } case 'C' : case 'D' : case 'E' : default: printf ("No Choice") ; } } my guess is - choice A choice B
what is the o/p?int main() { char inchar = 'A'; switch (inchar) { case 'A' : printf ("choice A \n") ; case 'B' : { printf ("choice B") ; break; } case 'C' : case 'D' : ca...
iarnav
419
views
iarnav
asked
Dec 26, 2017
Programming in C
programming-in-c
output
+
–
0
votes
1
answer
204
c programming
void printab () { static int i, a = -3, b = -6; i = 0; while (i <= 4) { if ((i++)%2 == 1) continue; a = a + i; b = b + i; printf("a = %d, b = %d\n", a, b);} } please explain the execution of the above code with an example.
void printab () { static int i, a = -3, b = -6; i = 0; while (i <= 4) { if ((i++)%2 == 1) continue; a = a + i; b = b + i; printf("a = %d, b = %d\n", a, b);} }please expla...
iarnav
606
views
iarnav
asked
Dec 26, 2017
Programming in C
programming-in-c
output
programming
+
–
0
votes
1
answer
205
c programming
Consider the following C program: int foo (int); /* Line 1 */ int main() { int da, db; //input da db = foo(da); } int foo (int a) { return a; } The above code compiled without any error or warning. If ... compile warning or error some compiler-warnings not leading to unintended results some compiler-warnings due to type-mismatch eventually leading to unintended results compiler errors
Consider the following C program:int foo (int); /* Line 1 */ int main() { int da, db; //input da db = foo(da); } int foo (int a) { return a; }The above code compiled with...
iarnav
421
views
iarnav
asked
Dec 25, 2017
Programming in C
programming-in-c
output
programming
+
–
0
votes
0
answers
206
C Prog
#include<stdio.h> int reverse(int); int main() { int num=4; reverse(num); return 0; } int reverse(num) { if(num==0) return 0; else printf("%d",num); reverse(num--); } What is the output ?
#include<stdio.h int reverse(int); int main() { int num=4; reverse(num); return 0; } int reverse(num) { if(num==0) return 0; else printf("%d",num); reverse(num ); }What i...
junaid ahmad
917
views
junaid ahmad
asked
Dec 20, 2017
Programming in C
programming-in-c
output
+
–
4
votes
1
answer
207
C programming
Consider the following program fragment: int d = 0; int i,j,k; for(i=1; i<31; ++i) for(j=1; j<31; ++j) for(k=1; k<31; ++k) if(((i+j+k)%3) == 0) d=d+1; printf("%d",d); The number of additions performed by the above program fragment is? a. 27,000 b. 27,000 x 3 c. 27,000 x 3 + 9,000 d. 9,930 + 2,700 x 3
Consider the following program fragment:int d = 0; int i,j,k; for(i=1; i<31; ++i) for(j=1; j<31; ++j) for(k=1; k<31; ++k) if(((i+j+k)%3) == 0) d=d+1; printf("%d",d);The n...
amIndian
1.8k
views
amIndian
asked
Dec 17, 2017
Programming in C
programming-in-c
output
loop
+
–
0
votes
2
answers
208
Output
Shivam Chauhan
561
views
Shivam Chauhan
asked
Dec 9, 2017
Programming in C
programming-in-c
output
+
–
0
votes
0
answers
209
output of program
Parshu gate
488
views
Parshu gate
asked
Dec 5, 2017
Programming in C
programming-in-c
output
programming
+
–
0
votes
0
answers
210
Timothy Williams - Programming Output
static char hello[]='hello'; printf("%s",hello); The output will be same as- puts("hello"); puts(hello); printf("%s", "hello"); puts("hello\n"); Answer is 1,2 and 3. Can anyone tell what's the problem with 4 option? It is also printing hello.
static char hello[]='hello'; printf("%s",hello);The output will be same as-puts("hello");puts(hello);printf("%s", "hello");puts("hello\n");Answer is 1,2 and 3.Can anyone ...
sushmita
1.4k
views
sushmita
asked
Dec 3, 2017
Programming in C
programming-in-c
output
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
12
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register