What will be the output of
x++ + ++x?
Answer Posted / naveenkumari
here we can see two types of increments pre and post
increment . since x++ is post increment first the value is
assigned and then increments but in case of ++x first the
value is incremented and then assigned since x is not
initialized with any value the above expression gives a
garbage value .For example if x is initialized with a value
"1" then the this expression gives the output as "3"
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is difference between %d and %i in c?
Explain the difference between call by value and call by reference in c language?
What is modeling?
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
Why #include is used in c language?
Write a program to find the biggest number of three numbers in c?
What are the three constants used in c?
What is mean by data types in c?
How can I dynamically allocate arrays?
What is the difference between #include
why programs in c are running with out #include
Can include files be nested? How many levels deep can include files be nested?
What is the use of the function in c?
how logic is used
What is a null pointer in c?