Pointers_Structures

Pointers_Structures

University

20 Qs

quiz-placeholder

Similar activities

logica excel

logica excel

1st Grade - University

21 Qs

Python MCQ

Python MCQ

University

20 Qs

Web technology quiz

Web technology quiz

University

15 Qs

UJIAN CALC XMK012 2021 JUN(3)

UJIAN CALC XMK012 2021 JUN(3)

University

20 Qs

Bases de Datos

Bases de Datos

University

19 Qs

ULANGAN HARIAN KELAS 11 IPA

ULANGAN HARIAN KELAS 11 IPA

University

20 Qs

SENATIC Parcial Guía 3_PseInt

SENATIC Parcial Guía 3_PseInt

10th Grade - University

15 Qs

Arduino Loop

Arduino Loop

2nd Grade - University

20 Qs

Pointers_Structures

Pointers_Structures

Assessment

Quiz

Computers

University

Medium

Created by

ALDO STALIN J L

Used 1+ times

FREE Resource

20 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

30 sec • 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

3.

MULTIPLE CHOICE QUESTION

3 mins • 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

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Code to change the 3rd array value to 50 using pointers

int main(){

int a[] = {10,20,30};

int *p = a;

----------------------;

}

p+3 = 50

*(p+3) = 50

*p+2 = 50

*(p+2) = 50

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

1. Prior to using a pointer variable it should be

Declared

Initialized

Both declared and initialized

None of these

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the output of C program with arrays and pointers.?

int main()

{

int a[3] = {20,30,40};

printf("%d", *(a+1));

}

20

30

40

Compiler error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?

.

&

*

->

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?