programming in c pointers

programming in c pointers

Professional Development

11 Qs

quiz-placeholder

Similar activities

Integumentary System

Integumentary System

6th Grade - Professional Development

15 Qs

JavaScript - Introduction

JavaScript - Introduction

Professional Development

13 Qs

Prueba estadística

Prueba estadística

University - Professional Development

10 Qs

Principios de bioseguridad

Principios de bioseguridad

Professional Development

10 Qs

terraform

terraform

Professional Development

14 Qs

Conceptos toxicologia 6 C Lae

Conceptos toxicologia 6 C Lae

1st Grade - Professional Development

10 Qs

independent and dependent variables

independent and dependent variables

5th Grade - Professional Development

15 Qs

Python Skills

Python Skills

1st Grade - Professional Development

15 Qs

programming in c pointers

programming in c pointers

Assessment

Quiz

Science

Professional Development

Medium

Created by

Prajakta Bhadale

Used 3+ times

FREE Resource

AI

Enhance your content

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

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

_____is a variable that stores memory address of another variable which is of similar data type.

node

array

pointer

string

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

datatype *pointer_variable_name;

array syntax

string syntax

pointer syntax

c syntax

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

pointer arithmetic operations...?

1.Increment

2.Decrement

3.Addition

4.Subtraction

1.multiplication

2.division

3.modular

1.Iogical AND

2.logical OR

any other

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

void main()

{

int a[5],sum=0,i,*ptr;

clrscr();

printf("\n Enter array elements:");

for(i=0;i<5;i++){

scanf("%d",&a[i]);

ptr=&a[0];

}

for(i=0;i<5;i++) {

sum=sum+(*ptr); ptr=ptr+1;

} printf("\n Sum= %d",sum);

getch();

}

ABOVE CODE IS OF.....?

C program to sum of all elements stored in given array

C program to sum of all elements

C program to sum of all elements stored in given array using pointer

C program to sum

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

datatype pointer_variable_name;

Eg: int ptr;

Array

Variable

string

pointer

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

void main() {

int x,y,a, b,*P1, P2;

x = 10; y = 20;

P1 = &x;

P2 = &y;

a = P1 * P2 +20;

b = P1 * *P2 – 20;

print f(“x=%d, y = %d”, x,y);

print f(“a=%d, b = %d”, a,b);

}

output for the above code is.....?

Output: x=15, y=10a=20, b=80

Output: x=20, y=10a=22, b=18

Output: x=10, y=20a=220, b=180

error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain meaning of following statements with reference to pointers

int a, b ; b = 20 ; a= b ; a = &b ;

no idea

int a,b; It is declaration of integer pointer a and integer variable b=20; value 20 is assigned to variable b. a=b; Value of b is assigned to pointer a. A=&b; Address of b is assigned to variable A.

int a,b; It is declaration of pointer a and integer variable b b=20; value 20 is assigned to variable b. a=b; Value of b is assigned to pointer a. A=&b; Address of a is assigned to variable A.

int a,b; It is declaration of integer pointer a and integer variable b b=20; value 20 is assigned to variable b. a=b; Value of b is assigned to pointer a. A=&b; Address of a is assigned to variable b.

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?

Discover more resources for Science