Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged output
173
views
0
answers
0
votes
Programming and DS
Trying out a code to get all the possible marks that can be obtained in a GATE paper. Assumptions taken : 1) All questions are MCQs (all questions have a chance of negative marking) 2) 30 1-mark questions, 35 2-mark questions 3) Static array without any ... [i]); return 0; } The console doesn't output anything. Any suggestions on where might I be going wrong/ the error lies?
Trying out a code to get all the possible marks that can be obtained in a GATE paper.Assumptions taken : 1) All questions are MCQs (all questions have a chance of negativ...
Mrityudoot
Mrityudoot
asked
Feb 26
Object Oriented Programming
programming-in-c
output
programming
+
–
2.8k
views
2
answers
7
votes
GATE CSE 2024 | Set 2 | Question: 23
Consider the following $\mathrm{C}$ function definition. int f X(char * a) { char * b = a; while (*b) b ++; return b - a; } Which of the following statements is/are TRUE? The function call $\text{f X("a b c d''}$) will ... ${ }^{*} \mathrm{C}=$ "abcd" in main (), the function call $\mathrm{fX}(\mathrm{c})$ will always return a value
Consider the following $\mathrm{C}$ function definition.int f X(char * a) { char * b = a; while (*b) b ++; return b - a; }Which of the following statements is/ar...
Arjun
Arjun
asked
Feb 16
Programming in C
gatecse2024-set2
programming
programming-in-c
multiple-selects
output
+
–
6.5k
views
3
answers
4
votes
GATE CSE 2024 | Set 1 | Question: 8
Consider the following $\mathrm{C}$ program: #include <stdio.h> int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; } Which one of the following ... The program prints $9$ as output The program prints $10$ as output The program gets stuck in an infinite loop The program prints $6$ as output
Consider the following $\mathrm{C}$ program:#include <stdio.h int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; }Whi...
Arjun
Arjun
asked
Feb 16
Programming in C
gatecse2024-set1
programming
programming-in-c
output
+
–
3.5k
views
3
answers
2
votes
GATE CSE 2024 | Set 1 | Question: 9
Consider the following $\mathrm{C}$ program: #include <stdio.h> void fX (); int main(){ fX(); return 0 }; void fX () { char a; if ((a=g e t c h a r()) ! = '\n') fX(); if (a ! ... program will not terminate The program will terminate with no output The program will terminate with $4321$ as output The program will terminate with $1234$ as output
Consider the following $\mathrm{C}$ program:#include <stdio.h void fX (); int main(){ fX(); return 0 };void fX () { char a; if ((a=g e t c h a r()) ! = '\n') ...
Arjun
Arjun
asked
Feb 16
Programming in C
gatecse2024-set1
programming
programming-in-c
output
+
–
446
views
1
answers
5
votes
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 18
What will be output printed by the following program? #include<stdio.h> main() { int c=4; switch(c) { c=c-1; case 4: printf("IITB "); break; default: printf("IISc "); case 3: printf("IITM "); case ... ;IITD"); } } $\text{IITB IITM}$ $\text{IITB IISc IITM}$ $\text{IITB}$ $\text{IITB IITM IITD}$
What will be output printed by the following program?#include<stdio.h main() { int c=4; switch(c) { c=c-1; case 4: printf("IITB ")...
GO Classes
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
output
1-mark
+
–
629
views
2
answers
8
votes
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 48
#include <stdio.h> int main() { int i= 255; short int *s= (short int *)&i; printf("%d\n", *s); } What will be the output of the above program in little-endian and big-endian, respectively? $(65280\text{ is } 255\times2^8)$ $255,\; 0$ $65280,\; 0$ $0,\;0$ $0,\; 65280$
#include <stdio.h int main() { int i= 255; short int *s= (short int *)&i; printf("%d\n", *s); }What will be the output of the above program in little-endian and big-endia...
GO Classes
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
little-endian-big-endian
output
2-marks
+
–
491
views
1
answers
6
votes
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 14
What will be the output of the following program? main() { int a[2][2] = { {1,2},{3,4} }; int(*p)[2][2]; p = &a; printf("%d", (*p)[0][0]); } $1$ $3$ $4$ None of these
What will be the output of the following program?main() { int a = { {1,2},{3,4} }; int(*p) ; p = &a; printf("%d", (*p)[0][0]); }$1$$3$$4$None of these
GO Classes
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
array
output
1-mark
+
–
522
views
1
answers
6
votes
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 26
What will be the output of the following C program? #include<stdio.h> void main() { int i=6; for(--i; --i; i--) { printf("%d",i); } } $42$ $31$ Infinite loop None of these
What will be the output of the following C program?#include<stdio.h void main() { int i=6; for( i; i; i ) { printf("%d",i); } }$42$$31$Infinite loopNone of these
GO Classes
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
output
2-marks
+
–
543
views
1
answers
6
votes
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 23
What will be the output on the execution of the following code segment? main() { unsigned num1=-1; signed num2=1; if(num1 < num2) printf("less"); else if(num1>num2) printf("greater"); else if(num1==num2) printf("equal"); } greater less equal error
What will be the output on the execution of the following code segment?main() { unsigned num1=-1; signed num2=1; if(num1 < num2) printf("less"); else if(num1>num2) printf...
GO Classes
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
output
1-mark
+
–
1.0k
views
1
answers
3
votes
GO Classes 2023 | IIITH Mock Test 1 | Question: 6
What will be the output of the following C program? #include<stdio.h> int main(){ int x=3; int y; switch(x++){ x++; case 3: printf("Three %d",x); break; case 4: printf("Four %d",x); break; case 5: printf("Five %d",x); break; default: printf("Default %d",x); } } Three $3$ Four $4$ Three $4$ Four $5$
What will be the output of the following C program?#include<stdio.h int main(){ int x=3; int y; switch(x++){ x++; case 3: printf("Three %d",x); break; case 4: printf("Fou...
GO Classes
GO Classes
asked
Mar 26, 2023
Programming in C
goclasses2023-iiith-mock-1
goclasses
programming
programming-in-c
output
1-mark
+
–
11.4k
views
4
answers
19
votes
GATE CSE 2023 | Question: 25
The integer value printed by the $\textsf{ANSI-C}$ program given below is _______________ #include<stdio.h> int funcp(){ static int x = 1; x++; return x; } int main(){ int x,y; x = funcp(); y = funcp()+x; printf("%d\n", (x+y)); return 0; }
The integer value printed by the $\textsf{ANSI-C}$ program given below is _______________#include<stdio.h int funcp(){ static int x = 1; x++; return x; } int main(){ int ...
admin
admin
asked
Feb 15, 2023
Programming in C
gatecse-2023
programming
programming-in-c
output
numerical-answers
1-mark
+
–
Page:
1
2
3
4
5
6
...
12
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register