Consider the following C program.
#include <stdio.h>
int main() {
int i;
for (i=0;i<3;++i) {
fork();fork();
}
}
How many processes are created when running this program
(including the initial one)?
Explain
Answers were Sorted based on User's Feedback
Answer / chetan raikwar
According to me, Total 6 processes.
1- execution of main() along with included library<stdio.h>.
2- declaration of 'i' as type 'int'.
3- for (i=0;i<3;++i)
4- fork();
5- fork(); (since two separate function will be executed separately whether it's a loop or not.
5- Termination of main function. }
Is This Answer Correct ? | 0 Yes | 0 No |
What are the 5 types of inheritance in c ++?
What are different storage class specifiers in c?
what is the disadvantage of using macros?
Is c still used?
What is the result main() { char c=-64; int i=-32 unsigned int u =-16; if(c>i){ printf("pass1,"); if(c<u) printf("pass2"); else printf("Fail2");} else printf("Fail1); if(i<u) printf("pass2"); else printf("Fail2") } a)Pass1,Pass2 b)Pass1,Fail2 c)Fail1,Pass2 d)Fail1,Fail2 e)none
why integer range between -327680to+32767
where do we use structure pointer?
1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do
1 Answers AAS, Nagarro, Vuram,
Write a program to display the no of bit difference between any 2 given numbers eg: Num1 will 12->1100 Num2 will 7->0111 the difference in bits are 2.
What does return 1 means in c?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
Explain what’s a signal? Explain what do I use signals for?