There is a pointer variable named ptr of type int then address of which type of variable the ptr will store in it?
Avariable of type char
Bvariable of type short
Cvariable of type int
Dvariable of type double
An int pointer stores the address of an int.
2.
★ Solved MCQs collection
Dereferencing operator is represented by _______
A*
B+
C–
DNone of the given
The unary * operator dereferences a pointer.
3.
★ Solved MCQs collection
What will be the correct syntax for initialization of pointer ptr of type int with variable x?
Aint ptr = &x ;
Bint ptr = x ;
Cint *ptr = &x ;
Dint ptr* = &x ;
A pointer to int is declared with * and initialized with the address of x.
4.
★ Past paper collection
The statement cout << yptr will show the __________the yptr points to.
AValue
Bmemory address
CVariable
DNone of the given
Printing the pointer itself shows the address it holds.
5.
★ Past paper collection
_________ is used as a dereferencing operator.
A*
B+
C-
DNone of the above
The unary * operator gives the value at the address in a pointer.
No MCQs match this filter.Is filter mein koi MCQ nahi.
1.
★ Final term subjective (Moaaz)Lecture 14
What is difference between pointer and variable?
Show answerJawab dekhein
A normal variable stores a data value (e.g. int x = 5; stores 5). A pointer variable stores the memory address of another variable (int *p = &x;). The value is reached through the pointer with the dereference operator *p, and pointers support address arithmetic.
No long questions added yet.Abhi koi long sawal shamil nahi.