Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged pointers
1
vote
1
answer
271
interview\ C program\ What is output
main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
Desert_Warrior
asked
in
Puzzles
May 15, 2016
by
Desert_Warrior
2.6k
views
programming-in-c
output
pointers
0
votes
1
answer
272
C programming \ predict the ouptput
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
Desert_Warrior
asked
in
Programming in C
May 15, 2016
by
Desert_Warrior
655
views
programming-in-c
pointers
0
votes
1
answer
273
C Programming doubt
What is the difference between struct node* head= NULL and struct node* head= (struct node*)NULL ?
UK
asked
in
Programming in C
Mar 25, 2016
by
UK
673
views
programming-in-c
structure
pointers
1
vote
3
answers
274
C pointer doubt
What is the difference when I write in program mynode * head; add_node(&head,10); add_node( struct node ** head, into value); To this mynode *head; add_node (head,10); add_node( struct node* head, into value) Which is the correct way of writing?
UK
asked
in
Programming in C
Mar 15, 2016
by
UK
691
views
programming-in-c
pointers
1
vote
1
answer
275
Output of c program
void fun(int *p) { int q = 10; p = &q; } int main() { int r = 20; int *p = &r; fun(p); printf("%d", *p); return 0; }
bad_engineer
asked
in
Programming in C
Mar 13, 2016
by
bad_engineer
8.7k
views
programming-in-c
barc2016
pointers
1
vote
1
answer
276
Output and please explain
#include<stdio.h> int main() { char *s = "Geeks Quiz"; int n = 7; printf("%.*s", n, s); return 0; }
Sandip Shaw
asked
in
Programming in C
Feb 25, 2016
by
Sandip Shaw
2.5k
views
programming-in-c
pointers
array
2
votes
1
answer
277
C program
why this function not do swapping #include <stdio.h> void swap(char *str1, char *str2) { char *temp = str1; str1 = str2; str2 = temp; } int main() { char *str1 = "Gate"; char *str2 = "Overflow"; swap(str1, str2); printf("str1 is %s, str2 is %s", str1, str2); return 0; } Output : str1 is Gate, str2 is Overflow
tiger
asked
in
Programming in C
Dec 14, 2015
by
tiger
626
views
programming-in-c
pointers
3
votes
2
answers
278
What is ouput will be printed in array , if following code performed
Main () { int a [3] [4] = $\begin{pmatrix} 1&2&3&4 \\ 5&6&7&8 \\ 9&10&11&12 \\ \end{pmatrix}$ printf ("\n% u% u% u", a[0]+1, * (a[0] + 1), *(*(a + 0)+1)); } What is the output of the above program? Assume array begin at address 10.
sabir
asked
in
Programming in C
Nov 24, 2015
by
sabir
918
views
array
pointers
1
vote
1
answer
279
Counting number of pointer modification
In circular linked list, insertion of a node at the end involves pointer modification: (A) one (B) two (C) three (D) none
shikharV
asked
in
DS
Nov 15, 2015
by
shikharV
1.2k
views
programming-in-c
pointers
linked-list
1
vote
2
answers
280
consider following code segment in c
consider following code segment in c main() { char * z="abc"; z[0]='x'; printf("%s",z); } what will be behavior of the program a>compiler error b>runtime error c>no error prints xbc d>no error prints abc
Anurag_s
asked
in
Programming in C
Oct 18, 2015
by
Anurag_s
582
views
programming-in-c
pointers
7
votes
3
answers
281
ISRO2015-72
Consider the following declaration: int a, *b=&a, **c=&b; The following program fragment a=4; **c=5; does not change the value of a assigns address of $c$ to $a$ assigns the value of $b$ to $a$ assigns $5$ to $a$
ajit
asked
in
Programming in C
Oct 12, 2015
by
ajit
4.7k
views
pointers
programming-in-c
isro2015
3
votes
2
answers
282
ISRO2014-13
Which of the following is true with respect to Reference? A reference can never be NULL A reference needs an explicit dereferencing mechanism A reference can be reassigned after it is established A reference and pointer are synonymous
ajit
asked
in
Programming in C
Sep 23, 2015
by
ajit
5.1k
views
programming
isro2014
pointers
0
votes
1
answer
283
Find the output of the following c code -
Find the output of the following c code- main() { char *ptr="gatebuddy"; *(ptr)++; ptr++; printf("%s\n",ptr); }
debanjan sarkar
asked
in
Programming in C
Aug 21, 2015
by
debanjan sarkar
1.1k
views
programming-in-c
pointers
0
votes
2
answers
284
Pointers
Now I suppose if i have a statement like *P++ then it is broken down as first (P++) and then *p (because both are unary operator and associtivity is right to left ) and if we have statement like a=*p++ then it is broken down into a=*p and then p is incremented !! Am i right ?
spriti1991
asked
in
Programming in C
Jun 1, 2015
by
spriti1991
672
views
pointers
programming-in-c
61
votes
11
answers
285
GATE CSE 2015 Set 3 | Question: 26
Consider the following C program #include<stdio.h> int main() { static int a[] = {10, 20, 30, 40, 50}; static int *p[] = {a, a+3, a+4, a+1, a+2}; int **ptr = p; ptr++; printf("%d%d", ptr-p, **ptr); } The output of the program is _______.
go_editor
asked
in
Programming in C
Feb 15, 2015
by
go_editor
22.4k
views
gatecse-2015-set3
programming
programming-in-c
normal
numerical-answers
pointers
78
votes
4
answers
286
GATE CSE 2006 | Question: 57
Consider this C code to swap two integers and these five statements: the code void swap (int *px, int *py) { *px = *px - *py; *py = *px + *py; *px = *py - *px; } S1: will generate a compilation error S2: may generate a ... procedure correctly for some but not all valid input pointers S5: may add or subtract integers and pointers S1 S2 and S3 S2 and S4 S2 and S5
Rucha Shelke
asked
in
Programming in C
Sep 26, 2014
by
Rucha Shelke
20.8k
views
gatecse-2006
programming
programming-in-c
normal
pointers
61
votes
5
answers
287
GATE CSE 2014 Set 1 | Question: 10
Consider the following program in C language: #include <stdio.h> main() { int i; int*pi = &i; scanf("%d",pi); printf("%d\n", i+5); } Which one of the following statements is TRUE? Compilation fails. Execution ... $5$ more than the address of variable $i$. On execution, the value printed is $5$ more than the integer value entered.
go_editor
asked
in
Programming in C
Sep 26, 2014
by
go_editor
17.4k
views
gatecse-2014-set1
programming
programming-in-c
easy
pointers
37
votes
5
answers
288
GATE CSE 2005 | Question: 1, ISRO2017-55
What does the following C-statement declare? int (*f) (int * ); A function that takes an integer pointer as argument and returns an integer A function that takes an integer as argument and returns an integer pointer A pointer ... pointer as argument and returns an integer A function that takes an integer pointer as argument and returns a function pointer
Kathleen
asked
in
Programming in C
Sep 22, 2014
by
Kathleen
20.6k
views
gatecse-2005
programming
programming-in-c
pointers
easy
isro2017
39
votes
5
answers
289
GATE CSE 2003 | Question: 89
Consider the C program shown below: #include<stdio.h> #define print(x) printf("%d", x) int x; void Q(int z) { z+=x; print(z); } void P(int *y) { int x = *y + 2; Q(x); *y = x - 1; print(x); } main(void) { x = 5; P(&x); print(x); } The output of this program is: $12 \ 7 \ 6$ $22 \ 12 \ 11$ $14 \ 6 \ 6$ $7 \ 6 \ 6$
Kathleen
asked
in
Programming in C
Sep 17, 2014
by
Kathleen
12.4k
views
gatecse-2003
programming
programming-in-c
normal
pointers
72
votes
4
answers
290
GATE CSE 2003 | Question: 2
Assume the following C variable declaration: int *A[10], B[10][10]; Of the following expressions: $A[2]$ $A[2][3]$ $B[1]$ $B[2][3]$ which will not give compile-time errors if used as left hand sides of assignment statements in a C program? I, II, and IV only II, III, and IV only II and IV only IV only
Kathleen
asked
in
Programming in C
Sep 16, 2014
by
Kathleen
29.9k
views
gatecse-2003
programming
programming-in-c
easy
pointers
62
votes
3
answers
291
GATE CSE 2001 | Question: 2.18
Consider the following three C functions: $[P1]$ int *g(void) { int x = 10; return (&x); } $[P2]$ int *g(void) { int *px; *px = 10; return px; } $[P3]$ int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; ... of the above three functions are likely to cause problems with pointers? Only $P3$ Only $P1$ and $P3$ Only $P1$ and $P2$ $P1, P2$ and $P3$
Kathleen
asked
in
Programming in C
Sep 14, 2014
by
Kathleen
24.0k
views
gatecse-2001
programming
programming-in-c
normal
pointers
51
votes
3
answers
292
GATE CSE 2000 | Question: 1.12
The most appropriate matching for the following pairs ... $X - 3 \ \ Y - 2 \ \ Z - 1$ $X - 3 \ \ Y - 1 \ \ Z - 2$
Kathleen
asked
in
Programming in C
Sep 14, 2014
by
Kathleen
11.8k
views
gatecse-2000
programming
programming-in-c
easy
match-the-following
pointers
2
votes
2
answers
293
what will be the output?
#include<stdio.h> #include<stdlib.h> int main() { struct xx { int x; char s; }; struct xx *t; t->x=5; t->s='a'; printf("%d %c\n", t->x, t->s); }
Manali Sikdar
asked
in
Programming in C
Sep 7, 2014
by
Manali Sikdar
756
views
pointers
easy
1
vote
1
answer
294
I have been struggling with pointers in multi-dimensional arrays. Please help me with this code :-
Explain the output :- int b[3][4] = {{1,2,3,4}, {5,6,7,8}, {9,10,11,12}}; int** p; p = (int**)b; cout << (long)*p << "\t" << (long)(*p+1) << "\t" << (long)(*p+2); //long is used to print the output in decimal format instead of hex
Sahil Vidyarthi
asked
in
Programming in C
Aug 23, 2014
by
Sahil Vidyarthi
1.3k
views
programming
programming-in-c
pointers
non-gate
Page:
« prev
1
...
5
6
7
8
9
10
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged pointers
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...