there are 2 processors each executing a separate program- processor 1 int a=10 int *ptr = &a; ptr is written into file1 processor sleeps for 10sec printf("%d",a); processor 2 int *p; file1 is read and contents are saved in p *p=5; processor 2 executes above program when porcessor one is sleeping, so when printf is executed wht will be the output?
AnswerBot
1y
The output will be 5.
Processor 1 initializes variable 'a' with a value of 10 and creates a pointer 'ptr' pointing to 'a'.
Processor 1 writes the value of 'ptr' into 'file1' and then sleeps for 10 secon...read more
Help your peers!
Add answer anonymously...
Top Marvel Realtors Software Engineer interview questions & answers
Popular interview questions of Software Engineer
Top HR questions asked in Marvel Realtors Software Engineer
>
Marvel Realtors Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app