what is the output for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}
Answer Posted / r.aruna
answer is 3,2,2
because print the value form right to left.
so,the first one ++i means preincrement.
so,incremented one,2
second one is i++ means postincrement .
it doesn't increment store in same location
but next i means 3.because move to next location
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
simple program of graphics and their output display
What is meant by operator precedence?
If I have a char * variable pointing to the name of a function ..
When should you use a type cast?
writ a program to compare using strcmp VIVA and viva with its output.
Explain built-in function?
How can I read and write comma-delimited text?
What is c++ used for today?
What is a program flowchart?
Why do we use null pointer?
Array is an lvalue or not?
In C programming, what command or code can be used to determine if a number of odd or even?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......