programming in c pointers

programming in c pointers

Professional Development

11 Qs

quiz-placeholder

Similar activities

Measuring Temperature

Measuring Temperature

Professional Development

8 Qs

Bramki logiczne

Bramki logiczne

1st Grade - Professional Development

10 Qs

Exception_handling

Exception_handling

Professional Development

15 Qs

Dogs

Dogs

KG - Professional Development

8 Qs

BOOLEAN 3

BOOLEAN 3

Professional Development

10 Qs

Avaliação Pensamento Computacional - Prático

Avaliação Pensamento Computacional - Prático

1st Grade - Professional Development

10 Qs

Езикът Java - синтаксис

Езикът Java - синтаксис

KG - Professional Development

9 Qs

Categories of Invasiveness in Animal Experiments

Categories of Invasiveness in Animal Experiments

Professional Development

6 Qs

programming in c pointers

programming in c pointers

Assessment

Quiz

Science

Professional Development

Medium

Created by

Prajakta Bhadale

Used 3+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?