Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by milankamilya
13
votes
8
answers
1
ISRO2015-69
If n has 3, then the statement a[++n]=n++; assigns 3 to a[5] assigns 4 to a[5] assigns 4 to a[4] what is assigned is compiler dependent
If n has 3, then the statement a[++n]=n++;assigns 3 to a[5]assigns 4 to a[5]assigns 4 to a[4]what is assigned is compiler dependent
8.6k
views
asked
Jun 14, 2016
Programming in C
isro2015
programming-in-c
non-gate
undefined-behaviour
+
–
2
votes
2
answers
2
Explain what the output will be at line A.
#include <sys/types.h> #include <stdio.h> #include <unistd.h> int value =5; int main( ) { pid_t pid; pid=fork( ); if (pid == 0) { /* child process */ value +=15; return 0; } else if (pid > 0) { /*parent process */ wait(NULL); printf(“PARENT: value=%d”, value); /* LINE A */ return 0; } } What output will be at Line A?
#include <sys/types.h #include <stdio.h #include <unistd.h int value =5; int main( ) { pid_t pid; pid=fork( ); if (pid == 0) { /* child process */ value +=15; return 0; }...
6.0k
views
asked
May 24, 2016
Operating System
process
inter-process-communication
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register