Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged structure
3
votes
3
answers
1
GO Classes Scholarship 2023 | Test | Question: 25
Consider struct alignment rules as described below - Each primitive data (int, char, float, etc.) type requiring $\text{K}$ bytes must be stored at the address must be multiple of $\text{K}.$ ... a [5]; long int b; } What will be $\text{sizeof(struct s)}?$ $24$ $18$ $32$ $20$
Consider struct alignment rules as described below –Each primitive data (int, char, float, etc.) type requiring $\text{K}$ bytes must be stored at the address must be m...
GO Classes
492
views
GO Classes
asked
Aug 6, 2022
Programming in C
goclasses-scholarship-test1
goclasses
programming
programming-in-c
structure
2-marks
+
–
3
votes
1
answer
2
GO Classes Scholarship 2023 | Test | Question: 28
What will be the output of the following program? #include<stdio.h> struct _go{ char b[20]; char *a; struct _go *c; }x[2] = {"GATE", "2023", x+1, "GO", "Classes", x}, *p = x; typedef struct_go go; go ... ;c, n-2); } int main() { printf("%s",mystry(p,2023)->a); } GATE $2023$ Run time error GO
What will be the output of the following program?#include<stdio.h struct _go{ char b[20]; char *a; struct _go *c; }x = {"GATE", "2023", x+1, "GO", "Classes", x}, *p = x;...
GO Classes
736
views
GO Classes
asked
Aug 6, 2022
Programming in C
goclasses-scholarship-test1
goclasses
programming
programming-in-c
structure
recursion
2-marks
+
–
3
votes
1
answer
3
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
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() { st...
GO Classes
555
views
GO Classes
asked
Apr 30, 2022
Programming in C
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
structure
pointers
multiple-selects
2-marks
+
–
3
votes
1
answer
4
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$
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 ; strcpy(m[0].name, ...
GO Classes
567
views
GO Classes
asked
Apr 30, 2022
Programming in C
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
structure
array
multiple-selects
2-marks
+
–
17
votes
2
answers
5
GATE CSE 2021 Set 2 | Question: 35
Consider the following $\text{ANSI C}$ program: #include <stdio.h> #include <stdlib.h> struct Node{ int value; struct Node *next;}; int main( ) { struct Node *boxE, *head, *boxN; int index=0; boxE=head= (struct ... which will be reported as an error by the compiler It dereferences an uninitialized pointer that may result in a run-time error
Consider the following $\text{ANSI C}$ program:#include <stdio.h #include <stdlib.h struct Node{ int value; struct Node *next;}; int main( ) { struct Node *boxE, *head, *...
Arjun
9.6k
views
Arjun
asked
Feb 18, 2021
Programming in C
gatecse-2021-set2
programming-in-c
normal
pointers
structure
2-marks
+
–
2
votes
3
answers
6
ISRO2020-74
Following declaration of an array of struct, assumes size of byte, short, int and long are $1,2,3$ and $4$ respectively. Alignment rule stipulates that $n$ - byte field must be located at an address divisible by $n$, the fields in the struct are not rearranged, padding is used ... is located at an address divisble by $8$, what is the total size of $C$, in bytes? $150$ $160$ $200$ $240$
Following declaration of an array of struct, assumes size of byte, short, int and long are $1,2,3$ and $4$ respectively. Alignment rule stipulates that $n$ – byte field...
Satbir
3.4k
views
Satbir
asked
Jan 13, 2020
Programming in C
isro-2020
programming
normal
structure
+
–
0
votes
0
answers
7
#file structure
Q. suppose the order of b-tree is 23. then how many index records will be stored in level 4(including root as level 1)
Q. suppose the order of b-tree is 23. then how many index records will be stored in level 4(including root as level 1)
amit166
304
views
amit166
asked
Oct 28, 2018
Databases
file
structure
+
–
0
votes
0
answers
8
D. Ritchie Doubt
Bit fields use for padding.It generally contained integer bits(signed and unsigned). But it cannot contain addresses. Does it mean bit field cannot contain a pointer ? When integer can contain a pointer, how bit field cannot contain a pointer?Are these not contradictory?
Bit fields use for padding.It generally contained integer bits(signed and unsigned). But it cannot contain addresses. Does it mean bit field cannot contain a pointer ?Whe...
srestha
249
views
srestha
asked
Aug 11, 2018
Programming in C
programming-in-c
structure
+
–
0
votes
1
answer
9
Dennis Ritchie Doubt
Lines from Dennis Ritchie 1) The variables named in a structure are called members. A structure member or tag and an ordinary (i.e., non-member) variable can have the same name without conflict, since they can always be distinguished by context. ... p1;} Here p2 is only not copying inside p1 and also incrementing value How copying and incrementing done same time in structures?
Lines from Dennis Ritchie1)The variables named in a structure are called members. A structure member or tag and an ordinary (i.e., non-member) variable can have the same ...
srestha
548
views
srestha
asked
Aug 9, 2018
Programming in C
programming-in-c
structure
+
–
2
votes
3
answers
10
pointers and structures
what will be output printed?
what will be output printed?
Shivani gaikawad
639
views
Shivani gaikawad
asked
May 3, 2018
Programming in C
structure
+
–
5
votes
3
answers
11
ISRO2018-2
Consider the following declaration : structaddr { char city[10]; char street[30]; int pin; }; struct { char name[30]; int gender; struct addr locate; } person, *kd = &person; Then *$(kd->name + 2)$ can be used instead of: $person.name+2$ $kd-> (name+2)$ $*((*kd).name+2)$ either $A)$ or $B)$ , not $C)$
Consider the following declaration :structaddr { char city[10]; char street[30]; int pin; }; struct { char name[30]; int gender; struct addr locate; } person, *kd = &pers...
Arjun
5.6k
views
Arjun
asked
Apr 22, 2018
Programming in C
isro2018
programming
structure
+
–
42
votes
9
answers
12
GATE CSE 2018 | Question: 2
Consider the following C program: #include<stdio.h> struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0', 'a'+2}; struct Ournode *q=&p; printf("%c, %c", *((char*)q+1), *((char*)q+2)); return 0; } The output of this program is: 0, c 0, a+2 '0', 'a+2' '0', 'c'
Consider the following C program:#include<stdio.h struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0', 'a'+2}; struct Ournode *q=&p; printf("%c, %c",...
gatecse
20.4k
views
gatecse
asked
Feb 14, 2018
Programming in C
gatecse-2018
programming-in-c
programming
structure
normal
1-mark
+
–
0
votes
1
answer
13
MadeEasy Test Series: Programming & DS - Programming In C
Consider the C node fragment given below: Which of the following true about above code if input is given as linked list of n-element in which for each node memory is created in heap area? A. Compiles successfully but execution may ... in else part. I think answer should be C. Because the return type is int node* Can someone please confirm.
Consider the C node fragment given below:Which of the following true about above code if input is given as linked list of n-element in which for each node memory is creat...
Rishabh Gupta 2
1.1k
views
Rishabh Gupta 2
asked
Jan 30, 2018
Programming in C
made-easy-test-series
programming-in-c
pointers
structure
linked-list
binary-heap
+
–
1
votes
0
answers
14
test series
how to calculate address in 3D array
how to calculate address in 3D array
92komal
404
views
92komal
asked
Jan 21, 2018
DS
data
structure
+
–
1
votes
0
answers
15
TEST SERIES
struct a { long int i; char ch[4]; }; main ( ) { struct a s; s.i=512; printf(“%d%d%d”,s.ch[0],s.ch[1],s.ch[3]); } What will be the output of following program? Garbage value 122 4 74 None of the above 121 2 72
struct a{long int i;char ch[4];};main ( ){struct a s;s.i=512;printf(“%d%d%d”,s.ch[0],s.ch ,s.ch[3]);}What will be the output of following program? Garbage value 122...
ankit_thawal
2.1k
views
ankit_thawal
asked
Jan 8, 2018
Programming in C
structure
data-structures
+
–
0
votes
0
answers
16
Testbook Test Series: Programming & DS - Programming In C
Rock
381
views
Rock
asked
Mar 25, 2017
Programming in C
testbook-test-series
programming-in-c
structure
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register