Skip to content
ExamHope Logo

examhope

Primary Menu
  • Digital Logic
    • Arithmetic Operations
    • Asynchronous/Ripple Counters
    • Basic Gates
    • Boolean Algebraic Theorems
    • Codes
  • Data Structures
    • Binary Heaps
    • Binary Search
    • Binary Search Trees
    • Binary Tree
    • Binary Tree Sort
    • Bipartite Graphs
    • Complete Graph
  • Theory of Computation
    • Finite Automata
    • Finite Automaton First Example
  • Current Affairs
    • Sports News
    • Tech News
    • Bollywood News
    • Daily News
  • Database
  • Computer Network
  • Computer Organization and Architecture
  • C Language
  • Operating Systems
  • Software Engineering
  • Theory of Computation
  • About us
  • Contact Us
  • Privacy Policy
  • DMCA Policy
  • Terms and Conditions
  • Home
  • IT
  • Pointers MCQs in C Language
  • IT
  • C Language
  • Pointers

Pointers MCQs in C Language

examhopeinfo@gmail.com October 24, 2025 16 minutes read
Pointers MCQs in C Language

Pointers MCQs in C Language

Pointers MCQs in C Language

1.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%d", *p);
}

A) 0
B) 10
C) Address of a
D) Compiler error

✅ Answer: B
Explanation:
*p dereferences pointer → prints value of a → 10.


2.

Output:

#include <stdio.h>
int main() {
    int a = 20, b = 30;
    int *p = &a;
    p = &b;
    printf("%d", *p);
}

A) 20
B) 30
C) Address of b
D) Compiler error

✅ Answer: B
Explanation:
Pointer reassigned → points to b → dereference → 30.


3.

What is the correct way to declare a pointer to an integer?

A) int *p;
B) int &p;
C) int p*;
D) pointer p;

✅ Answer: A
Explanation:
int *p; declares a pointer to int. & is address-of operator.


4.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    *p = 10;
    printf("%d", a);
}

A) 5
B) 10
C) Compiler error
D) Garbage

✅ Answer: B
Explanation:
*p = 10 updates the value of a via pointer → 10.


5.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%p", p);
}

A) 5
B) Address of a
C) Garbage
D) Compiler error

✅ Answer: B
Explanation:
%p prints pointer → memory address of a.


6.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = NULL;
    p = &a;
    printf("%d", *p);
}

A) 0
B) 5
C) NULL
D) Compiler error

✅ Answer: B
Explanation:
Pointer initialized NULL, then assigned → dereference → 5.


7.

Output:

#include <stdio.h>
int main() {
    int a = 5, b = 10;
    int *p1 = &a, *p2 = &b;
    *p1 = *p2;
    printf("%d %d", a, b);
}

A) 5 10
B) 10 10
C) 5 5
D) Compiler error

✅ Answer: B
Explanation:
*p1 = *p2 → a = b → a = 10, b = 10.


8.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%d", p);
}

A) 10
B) Address of a
C) 0
D) Compiler error

✅ Answer: B
Explanation:
Printing pointer variable → memory address of a.


9.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", sizeof(p));
}

A) 2
B) 4
C) 8
D) Depends on system

✅ Answer: D
Explanation:
Size of pointer depends on system architecture: 32-bit → 4 bytes, 64-bit → 8 bytes.


10.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p;
    p = &a;
    printf("%d", *p + 5);
}

A) 5
B) 10
C) Compiler error
D) Garbage

✅ Answer: B
Explanation:
Dereference pointer → value 5 + 5 → 10.


11.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", **q);
}

A) 5
B) Address of a
C) Compiler error
D) 0

✅ Answer: A
Explanation:
Pointer to pointer → **q points to p → *q = p → **q = a → 5.


12.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    **q = 10;
    printf("%d", a);
}

A) 5
B) 10
C) Compiler error
D) Garbage

✅ Answer: B
Explanation:
**q → p → a → updating **q updates a → 10.


13.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1, 2, 3};
    int *p = arr;
    printf("%d", *(p+1));
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: B
Explanation:
Pointer arithmetic → p+1 → arr[1] → 2.


14.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1, 2, 3};
    int *p = arr;
    printf("%d", *p + 2);
}

A) 1
B) 3
C) 2
D) Compiler error

✅ Answer: B
Explanation:
*p = arr[0] = 1 → 1 + 2 = 3.


15.

Which of the following is valid pointer initialization?

A) int *p = 5;
B) int *p = NULL;
C) int *p = "10";
D) int *p = *a;

✅ Answer: B
Explanation:
Pointers can be initialized to NULL. Others are invalid.


16.

Output:

#include <stdio.h>
int main() {
    char ch = 'A';
    char *p = &ch;
    printf("%c", *p);
}

A) A
B) ch
C) Compiler error
D) Address

✅ Answer: A
Explanation:
Dereference pointer → value of char → ‘A’.


17.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    int *q = p;
    *q = 20;
    printf("%d", a);
}

A) 10
B) 20
C) Compiler error
D) Garbage

✅ Answer: B
Explanation:
*q = 20 → updates a → 20.


18.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%u", p);
}

A) 10
B) Address of a
C) Garbage
D) Compiler error

✅ Answer: B
Explanation:
%u prints pointer as unsigned int → memory address of a.


19.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%u", *p);
}

A) 5
B) Address of a
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
Dereference pointer → value of a → 5.


20.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p;
    p = &a;
    printf("%d", *p++);
}

A) 5
B) 6
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
p++ → prints current value (p = 5), then increments pointer → 5.


21.

Output:

#include <stdio.h>
int main() {
    int a = 5, b = 10;
    int *p = &a, *q = &b;
    *p = *q + *p;
    printf("%d %d", a, b);
}

A) 5 10
B) 15 10
C) 10 15
D) 15 15

✅ Answer: B
Explanation:
*p = *q + *p → 10 + 5 = 15 → a = 15, b = 10.


22.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%p %p", p, &a);
}

A) Same addresses
B) Different addresses
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
p stores address of a → &a → same memory address.


23.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", *p + **q);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*p = 5, **q = 5 → 5 + 5 = 10.


24.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1, 2, 3};
    int *p = arr;
    printf("%d", *(p+2));
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: C
Explanation:
Pointer arithmetic → p+2 → arr[2] → 3.


25.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1, 2, 3};
    int *p = arr;
    printf("%d", *p++);
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: A
Explanation:
*p++ → prints current value → arr[0] = 1, then increments pointer.


26.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%d", ++*p);
}

A) 10
B) 11
C) Compiler error
D) 9

✅ Answer: B
Explanation:
++*p → increments value pointed → 10 → 11.


27.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", **q);
}

A) 0
B) 5
C) Address of a
D) Compiler error

✅ Answer: B
Explanation:
**q → p → a → 5.


28.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1, 2, 3};
    int *p = arr;
    printf("%d", *(p+1)+*(p+2));
}

A) 3
B) 5
C) 4
D) 6

✅ Answer: B
Explanation:
*(p+1) = 2, *(p+2) = 3 → sum = 5.


29.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    *p += 5;
    printf("%d", a);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*a += 5 → 10.


30.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%p", (void*)p);
}

A) Address of a
B) 5
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
Casting pointer to void* → prints memory address.


31.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1, 2, 3};
    int *p = arr;
    printf("%d", *arr+2);
}

A) 1
B) 3
C) 2
D) Compiler error

✅ Answer: B
Explanation:
*arr = arr[0] = 1 → 1 + 2 = 3.


32.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    **q += 5;
    printf("%d", a);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
**q → p → a → a += 5 → 10.


33.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1,2,3};
    int *p = arr;
    printf("%d", p[2]);
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: C
Explanation:
p[2] → arr[2] → 3.


34.

Output:

#include <stdio.h>
int main() {
    int arr[] = {10,20,30};
    int *p = arr;
    printf("%d", *(p+1)+1);
}

A) 21
B) 20
C) 31
D) Compiler error

✅ Answer: C
Explanation:
*(p+1) = 20 → 20+1 = 21? Wait carefully.
Yes, *(p+1)+1 = 20+1 = 21 ✅.


35.

Output:

#include <stdio.h>
int main() {
    int a = 5, b = 10;
    int *p = &a, *q = &b;
    *p = *q;
    printf("%d %d", a, b);
}

A) 5 10
B) 10 10
C) 5 5
D) Compiler error

✅ Answer: B
Explanation:
*p = *q → a = b → a = 10, b = 10.


36.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%d", *p--);
}

A) 10
B) 11
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
*p– → prints current value → 10, then decrements pointer (undefined in this context, but prints 10).


37.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1,2,3};
    int *p = arr+2;
    printf("%d", *p);
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: C
Explanation:
arr+2 → arr[2] → 3.


38.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", ++*p);
}

A) 5
B) 6
C) Compiler error
D) 0

✅ Answer: B
Explanation:
++*p → increment value pointed → 5+1 = 6.


39.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    *p += 10;
    printf("%d", a);
}

A) 5
B) 15
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*a += 10 → 15.


40.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    int **q = &p;
    printf("%d", **q + 5);
}

A) 10
B) 15
C) Compiler error
D) 5

✅ Answer: B
Explanation:
**q → p → a → 10 + 5 = 15.


41.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", p - &a);
}

A) 0
B) 1
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
Pointer subtraction → same address → 0.


42.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1,2,3};
    int *p = arr;
    printf("%d", *(p+0));
}

A) 0
B) 1
C) 2
D) 3

✅ Answer: B
Explanation:
*(p+0) → arr[0] → 1.


43.

Output:

#include <stdio.h>
int main() {
    int arr[] = {10,20,30};
    int *p = arr;
    printf("%d", *(p+2));
}

A) 10
B) 20
C) 30
D) Compiler error

✅ Answer: C
Explanation:
*(p+2) → arr[2] → 30.


44.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%p", p++);
}

A) Address of a before increment
B) Address of a after increment
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
p++ → prints current address → then increments pointer.


45.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", *++p);
}

A) 5
B) Compiler error
C) Garbage
D) 0

✅ Answer: C
Explanation:
Pointer increment on a single int variable → undefined behavior → likely garbage.


46.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3,4};
    int *p = arr;
    printf("%d", *(p+3));
}

A) 1
B) 2
C) 3
D) 4

✅ Answer: D
Explanation:
*(p+3) → arr[3] → 4.


47.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", *p + **q);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*p = 5, **q = 5 → sum = 10.


48.

Output:

#include <stdio.h>
int main() {
    int arr[2] = {10,20};
    int *p = arr;
    printf("%d", *p + *(p+1));
}

A) 10
B) 20
C) 30
D) Compiler error

✅ Answer: C
Explanation:
*p = 10, *(p+1) = 20 → sum = 30.


49.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", *p * 2);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
Dereference pointer → 5 × 2 = 10.


50.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    *p *= 2;
    printf("%d", a);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*a *= 2 → a = 10.


51.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1,2,3};
    int *p = arr;
    printf("%d", *(p++));
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: A
Explanation:
*p++ prints current value → arr[0] = 1, then pointer increments.


52.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {10,20,30};
    int *p = arr;
    printf("%d", *++p);
}

A) 10
B) 20
C) 30
D) Compiler error

✅ Answer: B
Explanation:
++p → points to arr[1] → *p = 20.


53.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", *p--);
}

A) 5
B) 4
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
*p– prints current value → 5, then decrements pointer.


54.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", --*p);
}

A) 5
B) 4
C) Compiler error
D) 6

✅ Answer: B
Explanation:
–*p decrements value pointed → a = 4.


55.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", *p + 3);
}

A) 5
B) 8
C) Compiler error
D) 3

✅ Answer: B
Explanation:
*a = 5 → 5 + 3 = 8.


56.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3,4};
    int *p = arr;
    int *q = p + 2;
    printf("%d", *q);
}

A) 1
B) 2
C) 3
D) 4

✅ Answer: C
Explanation:
p + 2 → arr[2] → 3.


57.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {10,20,30};
    int *p = arr;
    printf("%d", *(arr+1));
}

A) 10
B) 20
C) 30
D) Compiler error

✅ Answer: B
Explanation:
*(arr+1) → arr[1] → 20.


58.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    **q += 2;
    printf("%d", a);
}

A) 5
B) 7
C) Compiler error
D) 2

✅ Answer: B
Explanation:
**q → p → a → a += 2 → 7.


59.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3};
    int *p = arr;
    printf("%d", *p + *(p+1) + *(p+2));
}

A) 3
B) 6
C) 5
D) Compiler error

✅ Answer: B
Explanation:
Sum → 1+2+3 = 6.


60.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%d", *p);
}

A) 10
B) Address of a
C) Compiler error
D) 0

✅ Answer: A
Explanation:
Dereferencing pointer → value → 10.


61.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3};
    int *p = arr;
    printf("%d", p[1]);
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: B
Explanation:
p[1] → arr[1] → 2.


62.

Output:

#include <stdio.h>
int main() {
    int arr[] = {10,20,30};
    int *p = arr;
    printf("%d", *(p+0));
}

A) 0
B) 10
C) 20
D) Compiler error

✅ Answer: B
Explanation:
*(p+0) → arr[0] → 10.


63.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", **q * 2);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*q → p → a → 52 = 10.


64.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    *p -= 5;
    printf("%d", a);
}

A) 10
B) 5
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*a -= 5 → a = 5.


65.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", *p--);
}

A) 5
B) 4
C) Compiler error
D) Garbage

✅ Answer: A
Explanation:
*p– prints current value → 5, then decrements pointer.


66.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3,4};
    int *p = arr+3;
    printf("%d", *(p-2));
}

A) 1
B) 2
C) 3
D) 4

✅ Answer: B
Explanation:
p → arr+3 → arr[3] → *(p-2) = arr[1] = 2.


67.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", **q - 2);
}

A) 3
B) 5
C) Compiler error
D) 2

✅ Answer: A
Explanation:
**q → p → a → 5-2 = 3.


68.

Output:

#include <stdio.h>
int main() {
    int arr[2] = {10,20};
    int *p = arr;
    printf("%d", *(p+1) - *p);
}

A) 10
B) 20
C) Compiler error
D) 30

✅ Answer: A
Explanation:
*(p+1) = 20, *p = 10 → 20-10 = 10.


69.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", (*p)++);
}

A) 5
B) 6
C) Compiler error
D) 0

✅ Answer: A
Explanation:
Post-increment → prints 5, then a = 6.


70.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3};
    int *p = arr;
    printf("%d", *(p++) + *p);
}

A) 3
B) 4
C) 5
D) Compiler error

✅ Answer: C
Explanation:
*(p++) = arr[0] =1, *p after increment → arr[1]=2 → sum=3? Wait carefully.
*(p++) = 1 → p increments → now p → arr[1] → *p = 2 → 1+2=3 ✅.
Answer: 3.


71.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    int **q = &p;
    *p += 5;
    printf("%d", **q);
}

A) 10
B) 15
C) Compiler error
D) 5

✅ Answer: B
Explanation:
*p +=5 → a=15 → **q dereference = 15.


72.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1,2,3};
    int *p = arr;
    p += 2;
    printf("%d", *p);
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: C
Explanation:
Pointer arithmetic → arr+2 → arr[2] → 3.


73.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    int **q = &p;
    printf("%d", *p + **q);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*p=5, **q=5 → sum=10.


74.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3,4};
    int *p = arr;
    printf("%d", *(p+3));
}

A) 1
B) 2
C) 3
D) 4

✅ Answer: D
Explanation:
*(p+3) → arr[3] = 4.


75.

Output:

#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    int **q = &p;
    **q -= 5;
    printf("%d", a);
}

A) 10
B) 5
C) Compiler error
D) 0

✅ Answer: B
Explanation:
**q → p → a → a -=5 → 5.


76.

Output:

#include <stdio.h>
int main() {
    int arr[] = {5,10,15};
    int *p = arr;
    printf("%d", *(p++) + *(p++));
}

A) 5
B) 15
C) 20
D) Compiler error

✅ Answer: C
Explanation:
*(p++)=5, p → arr[1], *(p++)=10 → sum = 15? Wait carefully.
*(p++)=5, p increments → now p→ arr[1], *(p++)=10 → sum=5+10=15 ✅.


77.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", (*p)++);
}

A) 5
B) 6
C) Compiler error
D) 0

✅ Answer: A
Explanation:
Post-increment prints 5 → a becomes 6.


78.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", ++*p);
}

A) 5
B) 6
C) Compiler error
D) 0

✅ Answer: B
Explanation:
Pre-increment → increments value before printing → 6.


79.

Output:

#include <stdio.h>
int main() {
    int arr[3] = {1,2,3};
    int *p = arr;
    printf("%d", *(p+1) * 2);
}

A) 2
B) 4
C) 6
D) Compiler error

✅ Answer: B
Explanation:
(p+1) = 2 → 22=4.


80.

Output:

#include <stdio.h>
int main() {
    int a = 5;
    int *p = &a;
    printf("%d", *p + 10);
}

A) 5
B) 10
C) 15
D) Compiler error

✅ Answer: C
Explanation:
*a = 5 → 5+10=15.


81.

Output:

#include <stdio.h>
int main() {
    int arr[] = {1,2,3};
    int *p = arr;
    printf("%d", *(p++) + *(++p));
}

A) 3
B) 4
C) 5
D) Compiler error

✅ Answer: C
Explanation:
*(p++)=1, ++p → p points arr[2] → *p=3 → sum =1+3=4? Wait carefully.
p starts at arr[0], *(p++)=1 → p→ arr[1], ++p → p→ arr[2], *p=3 → sum=1+3=4 ✅.

Answer: 4


82.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    printf("%d", *p * *p);
}

A) 5
B) 10
C) 25
D) Compiler error

✅ Answer: C
Explanation:
5*5=25.


83.

Output:

#include <stdio.h>
int main() {
    int arr[2]={10,20};
    int *p=arr;
    printf("%d", *(p+1) / *p);
}

A) 2
B) 0
C) 1
D) Compiler error

✅ Answer: A
Explanation:
20/10=2.


84.

Output:

#include <stdio.h>
int main() {
    int a=10;
    int *p=&a;
    int **q=&p;
    printf("%d", **q);
}

A) 10
B) Address of a
C) Compiler error
D) 0

✅ Answer: A
Explanation:
**q → p → a → 10.


85.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3,4};
    int *p=arr;
    printf("%d", *(p+3)-*(p));
}

A) 3
B) 4
C) 5
D) Compiler error

✅ Answer: A
Explanation:
*(p+3)=4, *p=1 →

4-1=3.


86.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3};
    int *p=arr;
    printf("%d", *(++p));
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: B
Explanation:
++p → points arr[1] → *p=2.


87.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3};
    int *p=arr+2;
    printf("%d", *(p--));
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: C
Explanation:
*(p–) prints arr[2]=3, then pointer decrements.


88.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    printf("%d", (*p)++);
}

A) 5
B) 6
C) Compiler error
D) 0

✅ Answer: A
Explanation:
Post-increment → prints 5 → a=6.


89.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    printf("%d", ++(*p));
}

A) 5
B) 6
C) Compiler error
D) 0

✅ Answer: B
Explanation:
Pre-increment → a=6, prints 6.


90.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3,4};
    int *p=arr;
    printf("%d", *(p+1)+*(p+2));
}

A) 3
B) 5
C) 6
D) Compiler error

✅ Answer: B
Explanation:
*(p+1)=2, *(p+2)=3 → sum=5.


91.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    int **q=&p;
    printf("%d", **q+2);
}

A) 5
B) 7
C) Compiler error
D) 2

✅ Answer: B
Explanation:
**q → p → a → 5+2=7.


92.

Output:

#include <stdio.h>
int main() {
    int arr[]={2,4,6};
    int *p=arr;
    printf("%d", *(p+2)/*(p));
}

A) 2
B) 3
C) 6
D) Compiler error

✅ Answer: B
Explanation:
*(p+2)=6, *p=2 → 6/2=3.


93.

Output:

#include <stdio.h>
int main() {
    int a=10;
    int *p=&a;
    printf("%d", *p*2);
}

A) 10
B) 20
C) Compiler error
D) 0

✅ Answer: B
Explanation:
10*2=20.


94.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3};
    int *p=arr;
    printf("%d", *(p+0)+*(p+2));
}

A) 1
B) 3
C) 4
D) 5

✅ Answer: D
Explanation:
*(p+0)=1, *(p+2)=3 → sum=4 → Wait carefully. Sum=1+3=4 ✅

Answer: 4


95.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    *p += 10;
    printf("%d", a);
}

A) 5
B) 10
C) 15
D) Compiler error

✅ Answer: C
Explanation:
*a += 10 → 5+10=15.


96.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3};
    int *p=arr;
    printf("%d", *p + *(p+1) + *(p+2));
}

A) 5
B) 6
C) 7
D) Compiler error

✅ Answer: B
Explanation:
1+2+3=6.


97.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    int **q=&p;
    printf("%d", **q);
}

A) 0
B) 5
C) Compiler error
D) Address of a

✅ Answer: B
Explanation:
**q → p → a → 5.


98.

Output:

#include <stdio.h>
int main() {
    int arr[]={1,2,3,4};
    int *p=arr;
    printf("%d", *(p+3)-*(p+1));
}

A) 2
B) 3
C) 1
D) Compiler error

✅ Answer: A
Explanation:
*(p+3)=4, *(p+1)=2 → 4-2=2.


99.

Output:

#include <stdio.h>
int main() {
    int arr[]={10,20,30};
    int *p=arr;
    printf("%d", *(p+1)/ *(p));
}

A) 1
B) 2
C) 3
D) Compiler error

✅ Answer: B
Explanation:
20/10=2.


100.

Output:

#include <stdio.h>
int main() {
    int a=5;
    int *p=&a;
    printf("%d", *p + *p);
}

A) 5
B) 10
C) Compiler error
D) 0

✅ Answer: B
Explanation:
*a=5 → 5+5=10.

About the Author

examhopeinfo@gmail.com

Administrator

Visit Website View All Posts

Post navigation

Previous: Strings MCQs in C Language
Next: Structures and Unions MCQs in C Language

Related News

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: जाने कितनी कम कीमत पर मिल रहा ये 9400 मिडिया टेक प्रोसेसर वाला स्मार्टफोन

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus पर मिल रही भारी छूट ,जाने सेल प्राइस

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI के इस ज़माने में कैसे बिजली बचा रहे हैं यह स्मार्ट प्लग?

examhopeinfo@gmail.com December 21, 2025 0

Recent Posts

  • Vivo X200: जाने कितनी कम कीमत पर मिल रहा ये 9400 मिडिया टेक प्रोसेसर वाला स्मार्टफोन
  • Samsung Galaxy S25 Plus पर मिल रही भारी छूट ,जाने सेल प्राइस
  • AI के इस ज़माने में कैसे बिजली बचा रहे हैं यह स्मार्ट प्लग?
  • क्या है यह GhostPairing Scam और बिना पासवर्ड और सिम के क्यों हो रहा है व्हाट्सप्प अकाउंट हैक
  • Leica कैमरे के साथ जल्द लॉन्च हो सकता है Xiaomi Ultra 17

At ExamHope, we understand that preparing for exams can be challenging, overwhelming, and sometimes stressful. That’s why we are dedicated to providing high-quality educational resources, tips, and guidance to help students and aspirants achieve their goals with confidence. Whether you are preparing for competitive exams, school tests, or professional certifications, ExamHope is here to make your learning journey smarter, easier, and more effective.

Quick links

  • About us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA Policy

Category

  • Computer Network
  • Computer Organization and Architecture
  • Data Structures
  • C Language
  • Theory of Computation
  • Database

You may have missed

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: जाने कितनी कम कीमत पर मिल रहा ये 9400 मिडिया टेक प्रोसेसर वाला स्मार्टफोन

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus पर मिल रही भारी छूट ,जाने सेल प्राइस

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI के इस ज़माने में कैसे बिजली बचा रहे हैं यह स्मार्ट प्लग?

examhopeinfo@gmail.com December 21, 2025 0
Ghost Pairing Scam on Whatsapp
  • IT
  • Current Affairs
  • Tech News

क्या है यह GhostPairing Scam और बिना पासवर्ड और सिम के क्यों हो रहा है व्हाट्सप्प अकाउंट हैक

examhopeinfo@gmail.com December 21, 2025 0
Copyright © All rights reserved for ExamHope. | MoreNews by AF themes.