what is the output for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}
Answer Posted / sumalatha
Ans is 2 2 2
because in printf assosiativity is from left to right
first pre increments i that becomes 2 next post increment
is done after printf stmt so prints 2 again, then simple
print i i.e 2again
last post increnent which i becomes 3 but that is done
after printf stmt
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Why is this loop always executing once?
Why do we use main function?
What is the difference between test design and test case design?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What is getch () for?
What is merge sort in c?
What is the hardest programming language?
What is s in c?
What is #define used for in c?
Why array is used in c?