what is the value of b
if a=5;
b=++a + ++a

Answer Posted / vinit kumar

answer would be 14

because value will be stored in cpu register..

b=7+6

last vale is 7 then it increases two times so 7*2=14

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

713


How will you divide two numbers in a MACRO?

715


How does free() know explain how much memory to release?

621


Explain how can you avoid including a header more than once?

603


What is wrong with this code?

695






Why is it important to memset a variable, immediately after allocating memory to it ?

1555


Define macros.

785


Write a program to know whether the input number is an armstrong number.

673


What is the argument of a function in c?

575


What is identifier in c?

545


Why isnt any of this standardized in c?

638


Explain can the sizeof operator be used to tell the size of an array passed to a function?

597


How can I manipulate strings of multibyte characters?

639


What is output redirection?

693


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

1620