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.
Go to mobile version