wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Pointers

Total questions: 20

Worksheet time: 4mins

Name
Class
Date
1.

A pointer declaration statement

a)

datatype pointername;

b)

ptrname datatype;

c)

datatype *ptrname;

d)

datatype &ptrname;

2.

Double pointer is also known as

a)

Pointer to a Pointer

b)

Pointer to a variable

c)

pointer to a memory

d)

pointer to a value

3.

What is the data type of generic pointer?

a)

float

b)

void

c)

int

d)

double

4.

In the statement char names[10][5] how many address are saved;

a)

10

b)

5

c)

50

d)

15

5.

In the statement int a[5][5] how many one dimensional arrays exists?

a)

1

b)

10

c)

25

d)

5

6.

struct student

{

char *name;

}s,*sptr;

the statement which initializes names to "cse"

a)

s.*name="cse";

b)

sptr->name="cse";

c)

*s.name="cse"

d)

None

7.

From single dimensional array, Statement to get the address of the element at the ith index

a)

a+i

b)

&(a+i)

c)

both

8.

_________ is used to access the elements from two dimensional array

a)

*(*(a+i)+j)

b)

*(&(a+i)+j)

c)

&(*(a+i)+j)

d)

none

9.

Space occupied by the pointer depends

a)

Compiler

b)

Machine

c)

Both

d)

None

10.

Full Form of GCC

a)

GNU Compiler Collection

b)

General Compiler Collection

c)

Generative compiler Collection

d)

General C Compiler

11.

GCC is ____ bit compiler

a)

64

b)

16

c)

32

d)

8

12.

The statement to access name where name is a character pointer in a structure and sptr is a pointer to structure,

a)

(*sptr).name

b)

sptr->name

c)

both

d)

none

13.

A structure that contain a pointer to itself is known as

a)

Referential Structure

b)

Self Replica Structure

c)

Self Created Structure

d)

Self Referential Strcuture

14.

Give an Application of self referential structure

a)

Linked List

b)

arrays

c)

variables

d)

none

15.

The element that stores name and address of the next node in the linked list is called

a)

NODE

b)

LIST

c)

STACT

d)

QUEUE

16.

In Pointer "&" operator is known as

a)

info

b)

Next

c)

referencing operator

d)

de Referencing Opeator

17.

How many pointers can point to the same address?

a)

Multiple

b)

One

c)

Zero

d)

Two

18.

Pointer Operators ___________ are assosiated

a)

right to left

b)

left to left

c)

left to left

d)

right to right

19.

To point to a Memory location of a variable, Pointer type and variable type should be same

a)

False

b)

True

20.

if a is an array then the statement a++ is a __________ statement

a)

Valid Statement

b)

Invalid Statement