WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW
IT COME ..

#include<stdio.h>
#include<conio.h>
void main()
{
int k=20;
printf("%d%d%d%d",k,k++,++k,k);
getch();
}

Answer Posted / prats

but when we compile this code in editor it shows the output
22 21 21 20 .

whts wrong then ?

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why static variable is used in c?

556


what value is returned to operating system after program execution?

1606


Where does the name "C" come from, anyway?

645


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

4840


Explain continue keyword in c

586






How do you search data in a data file using random access method?

833


Explain function?

665


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

635


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2251


How can I change their mode to binary?

698


What is structure in c language?

619


Simplify the program segment if X = B then C ← true else C ← false

2587


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

764


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

1802


difference between native and cross compilers

1671