Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged goclasses2024-programming-3-weekly-quiz
3
votes
1
answer
1
GO Classes Test Series 2024 | Programming | Test 3 | Question: 15
If the $32$-bit number given below is stored in little-endian at address $1000,$ what is the value of the byte at address $1002?$ Answer in decimal. $0001\; 0010 \;0011\; 0100\; 0101\; 0110\; 0111\; 1000$ This number is the same as $12345678$ in hexadecimal.
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
427
views
goclasses2024-programming-3-weekly-quiz
numerical-answers
goclasses
programming
programming-in-c
number-representation
2-marks
2
votes
1
answer
2
GO Classes Test Series 2024 | Programming | Test 3 | Question: 16
What will be printed by the following program? #include<stdio.h> int func(int n, int * fg) { int t, f; if (n <= 1) { *fg = 1; return 1; } t = func(n - 1, fg); f = t + *fg; *fg = t; return f; } int main() { int x = 15; printf("%d\n", func(5, &x)); }
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
277
views
goclasses2024-programming-3-weekly-quiz
numerical-answers
goclasses
programming
programming-in-c
functions
2-marks
3
votes
1
answer
3
GO Classes Test Series 2024 | Programming | Test 3 | Question: 19
#include<stdio.h> int test(int *a, int *b) { int c = *a-*b; if (c<0) return 0; else return (1 + test(&c, b)); } void main() { int x = 15; int y = 4; int a = test(&x,&y); printf("%d", a); } $2$ $3$ $4$ Run time error since we can not pass the address of local variable c in the function test.
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
383
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
functions
pointers
parameter-passing
recursion
2-marks
3
votes
1
answer
4
GO Classes Test Series 2024 | Programming | Test 3 | Question: 21
Consider the following C code where main shows the intended use of the functions relating to struct foo. struct foo { int x; int y; int * p; }; struct foo* make_foo() { struct foo *foo = malloc(sizeof( ... program has a dangling pointer Given program may result in run time error Given program will result in a compile-time error
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
559
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
structure
pointers
multiple-selects
2-marks
3
votes
1
answer
5
GO Classes Test Series 2024 | Programming | Test 3 | Question: 22
What does the following program print? #include<stdio.h> #include<string.h> struct MdbRec { char name[16]; char msg[24]; }; int main() { struct MdbRec m[1]; strcpy(m[0].name, "dude"); strcpy(m[0].msg, " ... printf("%d", m->msg - (char *)m ); } Prints nothing Prints $17$ Prints $24$ Prints $16$
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
562
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
structure
array
multiple-selects
2-marks
3
votes
2
answers
6
GO Classes Test Series 2024 | Programming | Test 3 | Question: 23
What will be the output of the following lines of code? int i = 0; int j = 0; char *s = "ceded"; while (s[i] != '\0') { j = j + s[i] - 'b'; i = i + 1; } printf("%d %d\n", i, j); $5\; 11$ $4\; 16$ $5\; 16$ $4 \;11$
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
285
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
loop
output
2-marks
3
votes
1
answer
7
GO Classes Test Series 2024 | Programming | Test 3 | Question: 26
What will be the output of the following C program? #include<stdio.h> int main() { static int p[] = {1, 2, 3, 0, 5, 6}; static int *q[] = {p+2, p+1, p, p+3, p+4, p+5}; static int **r[] = {q+4, q+5, q+1, q, q+2, q+3}; int ***pt; pt = r + 2; printf("%d", ***(pt+3)-**(q+1)); }
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
433
views
goclasses2024-programming-3-weekly-quiz
numerical-answers
goclasses
programming
programming-in-c
array
pointers
array-of-pointers
2-marks
5
votes
1
answer
8
GO Classes Test Series 2024 | Programming | Test 3 | Question: 29
Mark all options which are likely to create problems with memory, i.e., run time error or have a memory leak. Assume malloc is always successful, and sizes are as follows - sizeof(int *) = 8 bytes sizeof(double) = 8 bytes sizeof(char) = 1 ... 4 int *p = malloc(sizeof(char)); *p = 0; Program $1$ Program $2$ Program $3$ Program $4$
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
560
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
pointers
multiple-selects
2-marks
4
votes
1
answer
9
GO Classes Test Series 2024 | Programming | Test 3 | Question: 30
What will be the output of the following program? It is given that $\textsf{sizeof(int) = 4}$ and $\textsf{sizeof(int *) = 8.}$ #include<stdio.h> main(){ void** p = 1000; int* q = ((int*)(p + 1)) - 1; printf("%u", q); } $1000$ $1008$ $1004$ Error, since $p+1$ is not allowed as $p$ is declared as void.
GO Classes
asked
in
Programming in C
Apr 30, 2022
by
GO Classes
345
views
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
pointers
2-marks
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged goclasses2024-programming-3-weekly-quiz
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...