Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged pointers
7
7 votes
1
1 answer
174
174 views
GO Classes DPP | GATE CS | C Programming | Pointer Notation
What is the output of the following code?#include <stdio.h int main() { int a[] = {3, 5, 7, 9}; printf("%d %d %d", *(a + 1), 2[a], *(2 + a)); return 0; }$\texttt{5 7 7}$ ...
GO Classes
174
views
asked
Jun 19
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-302
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
5
5 votes
1
1 answer
193
193 views
GO Classes DPP | GATE CS | C Programming | Pointer Arithmetic
What is the output of the following code?#include <stdio.h int main() { int a[] = {2, 4, 6, 8}; int *p = a; p = p + 2; printf("%d %d", *p, p[-1]); return 0; }$\texttt{6 4...
GO Classes
193
views
asked
Jun 19
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-302
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
6
6 votes
1
1 answer
204
204 views
GO Classes DPP | GATE CS | C Programming | Array & Pointers
What is the output of the following code?#include <stdio.h int main() { int arr[] = {10, 20, 30}; int *p = arr; printf("%d %d", *p, *(arr + 2)); return 0; }$\texttt{10 20...
GO Classes
204
views
asked
Jun 19
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-302
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
7
7 votes
3
3 answers
222
222 views
GO Classes DPP | GATE CS | C Programming | Uninitialized Pointer
What is the output of the following code?#include <stdio.h int main() { int *p; printf("%d", *p); return 0; }$\texttt{0}$ $\texttt{Garbage value}$ $\texttt{Compilation er...
GO Classes
222
views
asked
Jun 18
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-301
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
6
6 votes
2
2 answers
191
191 views
GO Classes DPP | GATE CS | C Programming | Call by Address
What is the output of the following code?#include <stdio.h void change(int *p, int q) { *p = *p + q; q = q + 5; *p = *p + q; } int main() { int a = 2, b = 3; change(&a, b...
GO Classes
191
views
asked
Jun 18
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-301
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
6
6 votes
3
3 answers
218
218 views
GO Classes DPP | GATE CS | C Programming | Pointer Aliasing
What is the output of the following code?#include <stdio.h int main() { int a = 5, b = 8; int *p = &a; int *q = &b; q = p; *q = *q + b; printf("%d %d", a, b); return 0; }...
GO Classes
218
views
asked
Jun 18
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-301
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
7
7 votes
2
2 answers
211
211 views
GO Classes DPP | GATE CS | C Programming | Pointer Update
What is the output of the following code?#include <stdio.h int main() { int a = 10; int *p = &a; *p = *p + 5; a = a + 2; printf("%d", *p); return 0; }$\texttt{10}$ $\text...
GO Classes
211
views
asked
Jun 18
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-301
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
5
5 votes
2
2 answers
233
233 views
GO Classes DPP | GATE CS | C Programming | Address and Dereference
What is the output of the following code?#include <stdio.h int main() { int a = 25; int *p = &a; printf("%d %d", a, *p); return 0; }$\texttt{25 25}$ $\texttt{25 address}$...
GO Classes
233
views
asked
Jun 18
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-301
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
7
7 votes
3
3 answers
239
239 views
GO Classes DPP | GATE CS | C Programming | Pointer Aliasing
What is the output of the following code?#include <stdio.h void update(int *p, int *q) { *p = *p + 2; *q = *q + 3; *p = *p + *q; } int main() { int a = 5; update(&a, &a);...
GO Classes
239
views
asked
Jun 8
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-292
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
numerical-answers
+
–
7
7 votes
1
1 answer
233
233 views
GO Classes DPP | GATE CS | C Programming | Static Variable in Recursion
What is the output of the following code?#include <stdio.h int solve(int n) { static int x = 1; if (n == 0) return x; x = x + n; return solve(n - 1); } int main() { print...
GO Classes
233
views
asked
Jun 6
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-291
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
7
7 votes
1
1 answer
221
221 views
GO Classes DPP | GATE CS | C Programming | Pointer to Pointer
What is the output of the following code?#include <stdio.h int main() { int a = 5, b = 10; int *p = &a; int q = &p; q = q + 3; p = &b; q = q + a; printf("%d %d", a, ...
GO Classes
221
views
asked
Jun 6
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-291
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
7
7 votes
1
1 answer
216
216 views
GO Classes DPP | GATE CS | C Programming | Functions and Pointers
What is the output of the following code?#include <stdio.h void change(int *p, int *q) { *p = *p + 4; *q = *p + *q; p = q; *p = *p - 3; } int main() { int a = 6, b = 10; ...
GO Classes
216
views
asked
Jun 6
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-290
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
7
7 votes
1
1 answer
224
224 views
GO Classes DPP | GATE CS | C Programming | Pointers
What is the output of the following code?#include <stdio.h int main() { int a = 8, b = 12; int *p = &a; int *q = &b; *p = *p + *q; q = p; *q = *q - 5; printf("%d %d", a, ...
GO Classes
224
views
asked
Jun 6
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-290
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
9
9 votes
2
2 answers
374
374 views
GO Classes DPP | GATE CS | C Programming | Pointers
What is the output of the following code?#include <stdio.h int main() { int a = 10, b = 20; int *p, *q; p = &a; q = &b; *p = *p + 5; *q = *p + *q; p = q; *p = *p - 10; pr...
GO Classes
374
views
asked
Jun 5
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-289
programming-in-c
c-programming
goclasses-c-programming-practice-questions
pointers
+
–
2
2 votes
1
1 answer
256
256 views
General C - Test | Pointers | Post Increment
Consider the following C program:What is the output printed by the above program?____ // gateastra.com
Lohith_Papineni
256
views
asked
Apr 9
Programming in C
programming-in-c
pointers
+
–
11
11 votes
3
3 answers
1.8k
1.8k views
GATE CSE 2026 | Set 2 | Question: 50
Consider the following ANSI-C program.#include <stdio.h int main(){ int *ptr, a, b, c; a=5; b=11; c=20; ptr=&a; *ptr=c; ptr=&c; a=*(&b); c=*ptr-a; printf("%d",c); return(...
gatecse
1.8k
views
asked
Feb 23
Programming in C
gatecse-2026-set2
programming-in-c
pointers
output
numerical-answers
two-marks
+
–
0
0 votes
0
0 answers
182
182 views
#DPP #programming #pointers
Ysh 1
182
views
asked
Feb 23
Programming in C
programming
programming-in-c
pointers
+
–
0
0 votes
1
1 answer
484
484 views
Storage classes and Pointers in Programming C
Consider the below statements:S1: Life time of dynamically allocated memory in heap segment is entire program.S2: NULL pointer dereferencing error and dangling pointer bo...
codertoday
484
views
asked
Jan 14
Programming in C
storage-classes-in-c
pointers
+
–
1
1 vote
1
1 answer
574
574 views
C Practice Question (Self Designed)
What will be the output of the following program? #include <stdio.h int main() { int i[] = {1,2,3}, j[] = {1,2,3}; int *p=i,*q=j; while ((*p++ = *q++) != 3) { printf("%d"...
DTYDHTB
574
views
asked
Jan 3
Programming in C
programming-in-c
data-structures
pointers
+
–
1
1 vote
1
1 answer
626
626 views
Complex declaration
Which of the following defines a variable ‘a’ as an array of pointers to integers? (a) int *b[10], a[10]; (b) int *b, a[10]; (c) int b, *a[10]; (d) int b, (*a)[10];I got ...
ASUR
626
views
asked
Oct 15, 2025
Programming in C
programming-in-c
pointers
+
–
1
1 vote
1
answers
1 answer
484
484 views
#pointers
What size should we use for Pointers for GATE? Pointers are architecture dependent so they have variable size so which architecture's pointer size should we assume?
Aryan_Karamtoth 1
484
views
asked
Oct 14, 2025
Programming in C
pointers
programming-in-c
+
–
1
1 vote
2
2 answers
537
537 views
UGC NET CSE | June 2025 | Part 2 | Question: 13
What would be the equivalent pointer expression for referring the array element $\operatorname{ar}[\mathrm{m}][\mathrm{n}][\mathrm{o}]$$^* (^* (^* (\operatorname{ar})+\ma...
Shubham Sharma 2
537
views
asked
Sep 10, 2025
Programming in C
ugcnetcse-june2025
programming-in-c
array
pointers
+
–
0
0 votes
2
2 answers
305
305 views
UGC NET CSE | June 2025 | Part 2 | Question: 61
Only legal pointer operations:pointer $+$ number $\rightarrow$ pointerpointer $-$ number $\rightarrow$ numberpointer $+$ pointer $\rightarrow$ pointerpointer $-$ pointer ...
Shubham Sharma 2
305
views
asked
Sep 10, 2025
Compiler Design
ugcnetcse-june2025
programming-in-c
pointers
+
–
1
1 vote
2
2 answers
390
390 views
UGC NET CSE | August 2024 | Part 2 | Question: 5
#include<stdio.h void main() { int arr[]={1, 2, 3, 4, 5}; int *p=arr; printf("%d", *p++); printf("%d", *(p+1)); }Find the output of the above code?$1,2$$1,3$$2,3$$1,4$
Shubham Sharma 2
390
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
array
output
+
–
0
0 votes
2
2 answers
389
389 views
UGC NET CSE | August 2024 | Part 2 | Question: 18
Consider the following code:#include<stdio.h void f1(char *x, char *y) { char *t1; t 1 = x; x= y; y = t 1;} void f2(char x, char y) { char *t1 ; t1 = *x; *x = *y; *y = ...
Shubham Sharma 2
389
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
output
functions
+
–
0
0 votes
1
1 answer
341
341 views
UGC NET CSE | August 2024 | Part 2 | Question: 19
Consider following C program :#include<stdio.h int main() { int x[]={2,4,6,8,10}; int a, b=0, * y = x+4; for(a = 0; a<5; a++) { b=b+(*y -a) - *(y -a); } printf("%d\n", b)...
Shubham Sharma 2
341
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
array
output
+
–
0
0 votes
1
1 answer
239
239 views
UGC NET CSE | August 2024 | Part 2 | Question: 20
Which of the following is correct way to declare a functional pointer in C?int *func (int, int);int (*func) (int, int);int (func*) (int, int);int *func* (int, int);
Shubham Sharma 2
239
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
+
–
0
0 votes
1
1 answer
258
258 views
UGC NET CSE | August 2024 | Part 2 | Question: 21
What will be the output of the following $\text{C}$ code?#include<stdio.h void main() { int arr[5]={10,20,30,40,50}; int *p = (int*) (&arr+1); printf("\%d\%d", *(arr + 1)...
Shubham Sharma 2
258
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
array
pointers
output
+
–
0
0 votes
1
1 answer
289
289 views
UGC NET CSE | August 2024 | Part 2 | Question: 71
Which of the following statements about pointers in $C$ are TRUE.Pointers can be used to access array elementsPointers can store the address of another pointerPointers ar...
Shubham Sharma 2
289
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-aug2024
programming-in-c
pointers
data-structures
+
–
0
0 votes
1
1 answer
337
337 views
UGC NET CSE | December 2023 | Part 2 | Question: 78
Consider the following code segment:int arr [] = {0,1,2,3,4}; int i=1, *ptr; ptr = arr + 2;arrange the following printf statements in the increasing order of their output...
Shubham Sharma 2
337
views
asked
Sep 9, 2025
Programming in C
ugcnetcse-dec2023
programming-in-c
pointers
array
+
–
Page:
« prev
1
2
3
4
5
6
7
...
15
next »