Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Programming:
Recent questions tagged programming
3
votes
1
answer
271
GO Classes Test Series 2024 | Programming | Test 2 | Question: 20
Consider the following two .c files, which both include the same .h file: When compiled, linked, and executed, the following output results: $x = 1 \; y = 2\; z = 3\; w = 4\; v = 5$ Assuming that this program compiled and linked ... Line$(6)$ - empty Line$(7)$ - empty Line$(8)$ - static Line$(9)$ - empty Line$(10)$ - static
Consider the following two .c files, which both include the same .h file:When compiled, linked, and executed, the following output results:$x = 1 \; y = 2\; z = 3\; w = 4...
GO Classes
411
views
GO Classes
asked
Apr 24, 2022
Programming in C
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
storage-classes-in-c
2-marks
+
–
6
votes
3
answers
272
GO Classes Test Series 2024 | Programming | Test 2 | Question: 21
What will be the output of the following program? #include<stdio.h> int rec(int x, int y) { static int count = 0; if (x == 0) return count; count++; if (x > y) rec(x - y, y); else rec(x, y - x); return count; } main() { int i = 10, j = 2, n; n = rec(i, j); printf("%d", n); } $4$ $5$ $6$ Infinite loop
What will be the output of the following program?#include<stdio.h int rec(int x, int y) { static int count = 0; if (x == 0) return count; count++; if (x y) rec(x - y, y)...
GO Classes
381
views
GO Classes
asked
Apr 24, 2022
Programming in C
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
recursion
output
2-marks
+
–
6
votes
1
answer
273
GO Classes Test Series 2024 | Programming | Test 2 | Question: 23
What will be the output of the program below- int i = 1; void my_extern1(void); void my_extern2(void); int main() { int count = 0; while (i++<5) { static int i = 3; i++; count +=i; my_extern1(); } printf("%d", ... (); } void my_extern2(){ extern int i; if (i++ < 3) my_extern1(); } Infinite recursion $9$ $4$ $5$
What will be the output of the program below-int i = 1; void my_extern1(void); void my_extern2(void); int main() { int count = 0; while (i++<5) { static int i = 3; i++; c...
GO Classes
319
views
GO Classes
asked
Apr 24, 2022
Programming in C
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
recursion
output
2-marks
+
–
0
votes
1
answer
274
How to find a range of float,double,long in c programming?
How to find a range of float,double,long in c programming? just like we find the range in case of int (signed,unsigned),char (signed ,unsigned) in c programming language ? like integer unsigned range is 0 to 65535 and so on for other data types ? Thank you ahead
How to find a range of float,double,long in c programming? just like we find the range in case of int (signed,unsigned),char (signed ,unsigned) in c programming language ...
ykrishnay
228
views
ykrishnay
asked
Apr 23, 2022
Programming in C
algorithms
programming-in-c
programming
number-system
digital-logic
+
–
5
votes
1
answer
275
GO Classes 2023 | Weekly Quiz 8 | Question: 2
Consider below four program fragments. Which of the program(s) is/are likely to produce run time error or memory leak. Assume malloc is always successful, and sizes are as follows - sizeof(int *) = 8 bytes sizeof(double) = 8 bytes sizeof(char) = 1 byte sizeof( ... ] = %d\n", a[0], a[1]); return 0; } Program $1$ Program $2$ Program $3$ Program $4$
Consider below four program fragments. Which of the program(s) is/are likely to produce run time error or memory leak. Assume malloc is always successful, and sizes are a...
GO Classes
1.1k
views
GO Classes
asked
Apr 21, 2022
Programming in C
goclasses_wq8
goclasses
programming
programming-in-c
multiple-selects
2-marks
+
–
3
votes
2
answers
276
GO Classes 2023 | Weekly Quiz 8 | Question: 3
#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
585
views
GO Classes
asked
Apr 21, 2022
Programming in C
goclasses_wq8
goclasses
programming
programming-in-c
output
2-marks
little-endian-big-endian
+
–
9
votes
1
answer
277
GO Classes Test Series 2024 | Programming | Test 1 | Question: 6
Consider the $k$ bit binary pattern on 2's complement system. $\text{T}_{\max}$ and $\text{T}_{\min}$ are maximum and minimum signed numbers we can represent using $k$ bits. $\text{U}_{\max}$ and $\text{U}_{\min}$ are maximum and minimum ... $\text{U}_{\min} = !(1>>31)$ $\text{U}_{\max} = \;\sim(1>>31)$
Consider the $k$ bit binary pattern on 2’s complement system.$\text{T}_{\max}$ and $\text{T}_{\min}$ are maximum and minimum signed numbers we can represent using $k$ b...
GO Classes
593
views
GO Classes
asked
Apr 18, 2022
Programming in C
goclasses2024-programming-1-weekly-quiz
goclasses
programming
number-representation
multiple-selects
1-mark
+
–
8
votes
1
answer
278
GO Classes Test Series 2024 | Programming | Test 1 | Question: 8
What is the output of the following code? Assume that int is $32$ bits, short is $16$ bits, and the representation is two's complement. unsigned int x = 0xDEADBEEF; unsigned short y = 0xFFFF; signed int z = -1; ... Hello"); if (x > z) printf("World"); Prints nothing Prints Hello Prints World Prints HelloWorld
What is the output of the following code? Assume that int is $32$ bits, short is $16$ bits, and the representation is two’s complement.unsigned int x = 0xDEADBEEF; unsi...
GO Classes
526
views
GO Classes
asked
Apr 18, 2022
Programming in C
goclasses2024-programming-1-weekly-quiz
goclasses
programming
programming-in-c
output
2-marks
+
–
Page:
« prev
1
...
5
6
7
8
9
10
11
12
13
14
15
...
32
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register