1
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
What does the following C statement declare?
int (*f)(int *);
A
A function that takes an integer pointer as argument and returns an integer
B
A function that takes an integer as argument and returns an integer pointer
C
A pointer to a function that takes an integer pointer as argument and returns an integer
D
A function that takes an integer pointer as argument and returns a function pointer
2
GATE CSE 2004
MCQ (Single Correct Answer)
+1
-0.3
Consider the following C function:
void swap (int a, int b)
{
   int temp;
   temp = a;
   a = b;
   b = temp;
}
In order to exchange the values of two variables x and y.
A
call swap (x, y)
B
call swap (&x, &y)
C
swap (x, y) cannot be used as it does return any value
D
swap (x, y) cannot be used as the parameters are passed by value
3
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
Assume the following C variable declaration

int * A[10], B[10][10];

Of the following expressions

I. A[2]
II. A[2] [3]
III. B[1]
IV. B[2] [3]

Which will not give compile-time errors if used as left hand sides of assignment statements in a C program?
A
I, II, and IV only
B
II, III, and IV only
C
II and IV only
D
IV only
4
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 be
A
An array, each element of which is a pointer to a structure of type node
B
A structure of 2 fields, each field being a pointer to an array of 10 elements
C
A structure of 3 fields: an integer, a float, and an array of 10 elements
D
An array, each element of which is a structure of type node
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12