Pointers_Structures

Pointers_Structures

University

20 Qs

quiz-placeholder

Similar activities

Selenium Overview

Selenium Overview

University

15 Qs

Python Unit 1 Quiz

Python Unit 1 Quiz

University

20 Qs

Round 1 for Preplacement Bootcamp.

Round 1 for Preplacement Bootcamp.

University

15 Qs

Aplikasi dan Tipe Data/File

Aplikasi dan Tipe Data/File

11th Grade - University

15 Qs

Entrada e Saída em Python

Entrada e Saída em Python

University

16 Qs

Algoritma Remedial RPL

Algoritma Remedial RPL

University

20 Qs

HTML - Introdução

HTML - Introdução

University

16 Qs

CSC305: TOPIC 2

CSC305: TOPIC 2

University

15 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?