Programming in C · Previous year questions
Structures, Unions and Dynamic Memory Allocation
2 questions from GATE CS 2017 to 2017, newest first.
Questions
GATE CS 2017 Set 1, Q.13 (CS Q.13)
Consider the following C code: #include <stdio.h> #include <stdlib.h> int *assignval(int *x, int val) { *x = val; return x; } void main() { int *x = malloc(sizeof(int)); if (NUL...
Structures, Unions and Dynamic Memory Allocation · Pointers, Arrays and Strings
GATE CS 2017 Set 2, Q.2 (CS Q.2)
Match the following: | Item | Description | | :--- | :--- | | (P)
static char var;| (i) Sequence of memory locations to store addresses | | (Q)m = malloc(10); m = NULL;|...Functions, Recursion, Scope and Storage Classes · Structures, Unions and Dynamic Memory Allocation