Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged pointers
7
votes
2
answers
1
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 33
On a $64$-bit system, which of the following C expressions is equivalent to the C expression $(x[2]+4)[3]?$ Assume $\mathrm{x}$ is declared as $\textsf{int}\ast \ast \textsf{x}$ $\ast((*(x+16))+28)$ $\ast((*(x+2))+7)$ $\ast(((* x)+2)+7)$ $(* \ast(x+2)+7)$
On a $64$-bit system, which of the following C expressions is equivalent to the C expression $(x +4)[3]?$ Assume $\mathrm{x}$ is declared as $\textsf{int}\ast \ast \text...
GO Classes
453
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
programming
programming-in-c
pointers
1-mark
+
–
1
votes
1
answer
2
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 27
Consider the following C program:- #include <stdio.h> void ubswap(int **a, int **b) { int* temp = *a; *a = *b; *b = temp; } int main() { int x = 1, y = 9; int* u = &x; int* v = &y; int** a = &u; int** b ... $\text{ return 0 }?$ $x$ and $y$ $u$ and $v$ $a$ and $b$ None of the above
Consider the following C program:-#include <stdio.h void ubswap(int a, int b) { int* temp = *a; *a = *b; *b = temp; } int main() { int x = 1, y = 9; int* u = &x; int* v...
GO Classes
489
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
pointers
2-marks
+
–
1
votes
1
answer
3
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 22
What will the following print: int a, b, c, *d; a = 0; b = 1 ; c = 2 ; d = & a; (*d) += b+c; d = & b; (*d) += a+b+c ; printf("a= %i b=%i\n", a, b); $a=0, b=3$ $a=3, b=3$ $a=3, b=4$ $a=3, b=7$
What will the following print:int a, b, c, *d; a = 0; b = 1 ; c = 2 ; d = & a; (*d) += b+c; d = & b; (*d) += a+b+c ; printf("a= %i b=%i\n", a, b);$a=0, b=3$$a=3, b=3$$a=3...
GO Classes
419
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
pointers
1-mark
+
–
0
votes
0
answers
4
ISRO2020-62
#include int main() { int x; char *ptr; x=622,100,101; printf("%d",(*(char *)&x)*(x%3)); return 0; } In this question what is the meaning of “ *(char *)&x “ ? please explain it.
#includeint main(){ int x;char *ptr;x=622,100,101;printf("%d",(*(char *)&x)*(x%3));return 0; }In this question what is the meaning of “ *(char *)&x “ ? please ...
Ray Tomlinson
887
views
Ray Tomlinson
asked
Jul 5, 2023
Programming in C
isro-2020
programming-in-c
pointers
programming
+
–
0
votes
1
answer
5
Pointer, Address
For arrays with more given elements than its size, why does doing a[i] print garbage value but *a+i brings the correct value, despite them being the same thing (a[i] = *a+i) int a[2] = {1,2,3,4}; for ( int i =0 ; i<=4 ;i++){ printf(“%d” , a[i]; // gives 1, 2, Garbage , Garbage printf(“%d”, *a+i; // gives 1, 2, 3, 4 }
For arrays with more given elements than its size, why does doing a[i] print garbage value but *a+i brings the correct value, despite them being the same thing (a[i] = *a...
Mrityudoot
688
views
Mrityudoot
asked
Apr 24, 2023
Programming in C
programming-in-c
pointers
+
–
2
votes
2
answers
6
#Pointers #Pointer_initialization
Why can’t we do pointer initialization as int *p; *p=x; instead of p = &x; ?
Why can’t we do pointer initialization as int *p; *p=x; instead of p = &x; ?
Mrityudoot
296
views
Mrityudoot
asked
Apr 23, 2023
Programming in C
programming
pointers
+
–
3
votes
1
answer
7
Pointers
Please explain this question void main() { int a =300; char *ptr = (char*) &a ; ptr++; *ptr=2; printf("%d" , a); }
Please explain this question void main() { int a =300; char *ptr = (char*) &a ; ptr++; *ptr=2; printf("%d" , a); }
Storm_907
470
views
Storm_907
asked
Apr 16, 2023
Programming in C
pointers
programming-in-c
+
–
0
votes
1
answer
8
physics wallah dpp
_Harshit
745
views
_Harshit
asked
Mar 18, 2023
Programming in C
programming-in-c
pointers
physicswallah
+
–
0
votes
0
answers
9
TestBook testseries TLB and C programming combined question
Consider the following C function executed in an OS with paging where the page size is 4 kilobytes. Further, assume that the system employs a 32-entry direct mapped TLB. int *alloc_and_init() { int counter, value=0, size=2048; int ... of the program, what is the number of TLB misses during the execution of the for loop? 0 1 2048 2
Consider the following C function executed in an OS with paging where the page size is 4 kilobytes. Further, assume that the system employs a 32-entry direct mapped TLB.i...
Sahil_Lather
216
views
Sahil_Lather
asked
Jan 28, 2023
Programming in C
operating-system
programming-in-c
data-structures
pointers
+
–
Page:
1
2
3
4
5
6
...
10
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register