1
GATE CSE 2000
MCQ (Single Correct Answer)
+1
-0.3
The following C declarations
struct node{
int i:
float j;
};
struct node *s[10];
define s to be2
GATE CSE 2000
MCQ (Single Correct Answer)
+1
-0.3
The most appropriate matching for the following pairs
X: m=malloc(5); m= NULL;
Y: free(n); n->value = 5;
Z: char *p; *p='a';
1: using dangling
2: using uninitialized pointers
3. lost memory
is:
X: m=malloc(5); m= NULL;
Y: free(n); n->value = 5;
Z: char *p; *p='a';
1: using dangling
2: using uninitialized pointers
3. lost memory
is:
3
GATE CSE 2000
MCQ (Single Correct Answer)
+1
-0.3
Consider the following C declaration
struct {
short s[5];
union {
float y;
long z;
} u;
}t;
Assume that objects of the type short, float and long occupy 2 bytes, 4 bytes and
8 bytes, respectively. The memory requirement for variable t, ignoring alignment
considerations, isQuestions Asked from Pointer and Structure in C (Marks 1)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE Subjects
Discrete Mathematics
Programming Languages
Theory of Computation
Operating Systems
Computer Organization
Database Management System
Data Structures
Computer Networks
Algorithms
Compiler Design
Software Engineering
Web Technologies
General Aptitude