Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
the_bob
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by the_bob
0
votes
0
answers
1
Modification to GATE CS-2001 question on Pointers
Suppose, I have this program #include <stdio.h> #include <stdlib.h> int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; return px; } int main() { int y=*g(); /* Doubt */ printf("%d",y); ... ' as :- int y=g(), then in the output, I get a garbage value. I am unable to understand why. Can anyone please explain ?
Suppose, I have this program…#include <stdio.h #include <stdlib.h int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; return px; } int main() { int y=*g...
312
views
asked
Jan 16, 2019
Programming in C
programming-in-c
+
–
0
votes
0
answers
2
Test-Series
Can anyone please explain the functioning of the statement (specified in bold) ? #include <stdio.h> void main(){ int p = -8; int i = (p++, ++p); printf("%d\n", i); }
Can anyone please explain the functioning of the statement (specified in bold) ?#include <stdio.h>void main(){int p = -8;int i = (p++, ++p);printf("%d\n", i);}
679
views
asked
Nov 10, 2018
Programming in C
programming-in-c
output
+
–
0
votes
1
answer
3
Mutual Exclusion vs. Hold and Wait
In the context of a Deadlock, what is the difference between Mutual Exclusion and Hold and Wait ? In case of Hold and Wait, a process holds atleast one resource. Doesn't this correspond to Mutual Exclusion, where atleast one resource is held in a non-shareable mode ??
In the context of a Deadlock, what is the difference between Mutual Exclusion and Hold and Wait ?In case of Hold and Wait, a process holds atleast one resource. Doesn't t...
959
views
asked
Sep 25, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register