C - Pointers

C - Pointers

University

10 Qs

quiz-placeholder

Similar activities

QUIZ 1: REVIEW ON C

QUIZ 1: REVIEW ON C

University

15 Qs

Computer Science Quiz

Computer Science Quiz

University

15 Qs

BASIC HTML

BASIC HTML

University

9 Qs

Summer Code Camp - Lesson 1

Summer Code Camp - Lesson 1

University

10 Qs

IEEE Coding Competition

IEEE Coding Competition

University

13 Qs

DDT1B_Pre-test_080322

DDT1B_Pre-test_080322

University

10 Qs

C++ Array Quiz

C++ Array Quiz

University

10 Qs

quiz pertemuan 2 asik ddp

quiz pertemuan 2 asik ddp

University

15 Qs

C - Pointers

C - Pointers

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Vidhu Priya

Used 1K+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a C Program if

int a = 5;

Int *ptr = &a;

then the printf statement with

&a, a, *ptr , ptr

adrress, Value, Value, Adress

address, value, value, value

all address

All values

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In a C program,

int a = 20;

*ptr = &a;

**dptr = &ptr;

printf ("%d", **dptr);


prints

address of a

address of ptr

value of a

address of dptr

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does this command do?.

Creates a pointer of type integer that is initially pointing to null.

Creates a pointer of type integer that is initially pointing to 0.

Creates a pointer in the heap

None of the answers are valid

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If ptr is a pointer variable pointing to an array, then

"printf("%d",*(ptr++)) ;"

statement will print :

Next location address

Next location index value

Next location value

Compile time error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be output?

int i=10;

int *p;

p=&i;

i+=5;

printf("\n i=%d *p=%d", i,*p)

i=10, *p=10

i=10, *p=15

i=15, *p=15

i=15, *p=10

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Point out the compile time error in the program given below.

#include<stdio.h>


int main()

{

int *x;

*x=100;

return 0;

}

Error: invalid assignment for x

Error: suspicious pointer conversion

No error

None of the above

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Is the NULL pointer same as an uninitialised pointer?

Yes

No

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers