ExamVeda
Login
Home
This question belongs to Computer Science Linux
Linux
?

What is the output of this progarm?
#include<stdio.h>
#include<unistd.h>
 
int main()
{
    pid_t child;
    int a, b;
    a = 10;
    b = 20;
    child = fork();
    a = a + b;
    if(child > 0){
        printf("%d\n",a);
    } 
    return 0;
}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.