
programming in c pointers

Quiz
•
Science
•
Professional Development
•
Medium
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
Similar Resources on Wayground
10 questions
Management of Learning: Rudiments in Research Planning

Quiz
•
Professional Development
10 questions
EXPO 04 DISEÑO NO EXPERIMENTAL

Quiz
•
1st Grade - Professio...
8 questions
L'intensité du courant électrique - 2

Quiz
•
KG - Professional Dev...
10 questions
Test de Ciencia de Datos_01

Quiz
•
Professional Development
10 questions
PP 13 Central Heating System Quiz

Quiz
•
Professional Development
11 questions
CE Mat Lab - Rockwell Hardness

Quiz
•
Professional Development
8 questions
Atención Temprana al desarrollo

Quiz
•
Professional Development
14 questions
Tema 5 - Arboles de Decision

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade