Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on What is a output?. How will Come?. within the C and C++ forums, part of the Software Development category; 0 0 1 2 -1...
|
|||||||
|
|||
|
Re: What is a output?. How will Come?.
the output is 5 6 6 5 5
|
|
|||
|
Re: What is a output?. How will Come?.
the output will be 00131
All the effect will be occur at next statement because of post increment the || operator is the last element and the value of l is 2 so that any value of the previous generation will be ommited and the value of m will be true i.e. 1 m=0||1 is 1 i=-1 --> 0 j=-1 --> 0 k=0 --> 1 l=2 --> 3 m = 1 |
|
|||
|
Re: What is a output?. How will Come?.
The output for this expression is ambiguous. The ANSI C standard does not define the order of evaluation of arguments to a function. Hence, the output may vary depending on the compiler you use.
|
|
|||
|
Re: What is a output?. How will Come?.
Quote:
Code:
11111111 11111111 11111111 11111111 Code:
1 00000000 00000000 00000000 00000000 |
|
|||
|
Re: What is a output?. How will Come?.
Quote:
EXP : As the expression have 3 && operators at the begin it will check for all the case s ,& will get 0 as resultant wch is || with 1 (i.e.,2) So that m=0||1=1. |
|
|||
|
Re: What is a output?. How will Come?.
++giveit=2 n -gotit= -2
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| First output value is getting overwritten by second output | Geek_Guest | QTP | 2 | 01-05-2008 04:40 AM |
| Input and output | AnnieL4864 | VB.NET | 1 | 11-20-2007 05:12 AM |
| How many Classes in output | JobHelper | Java | 7 | 06-12-2007 04:14 AM |
| Output Value | bharathi_ark | Testing Issues | 5 | 12-27-2006 07:13 AM |
| Output Functions | RyanJames | C and C++ | 5 | 12-20-2006 03:10 AM |