what is the Output?
int a=4 b=3;
printf("%d%d%d%d%d%d",a++,++a,a++,a++,++a,a++);
printf("%d%d%d%d%d%d",b--,b--,--b,b--,--b,--b);
Answers were Sorted based on User's Feedback
Answer / arun sebastin
9 9 7 6 6 4
-2 -1 -1 1 1 2
The conceptis simple dothe operation in reverse
Is This Answer Correct ? | 9 Yes | 2 No |
output
997664
-2-1-1112
here the concept is very is....
the work flow of the printf statement is right to left
and display of the statement is left to right.......
thats all very simple logic
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / dumitru
in Open Suse the result is:
9 10 7 6 10 4
-2 -1 -3 1 -3 -3
Is This Answer Correct ? | 2 Yes | 4 No |
Answer / vinod kumar
in fedora it is giving
91076104
-2-1-31-3-3
but dont know how
Is This Answer Correct ? | 0 Yes | 5 No |
Write an interactive c program that will encode or decode a line of text. To encode a line of text, proceed as follows: Convert each character, including blank spaces, to its ASCII equivalent. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. Suppose that N1 represents the lowest permissible value in the ASCII code, and N2 represents the highest permissible value. If the number obtained in step 2 above exceeds N2, then subtract the largest possible multiple of N2 from this number, and add the remainder to N1. Hence the encoded number will always fall between N1 and N2, and will therefore always represent some ASCII character. Display the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text. Be certain, however, that the same random number is used in decoding as was used in encoding.
1 Answers Amazon, CSJM, HCL, Microsoft, TCS, Wipro,
Can a void pointer point to a function?
What is RAM memory? and What is ROM?Who designed one is temparary and another is permanent?why they designed like that?By using far pointer which type data(whether hexadecimal)we can access?
How arrays can be passed to a user defined function
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
Is using exit() the same as using return?
Do pointers take up memory?
What are structure members?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
write a program to read a number and print in words that is in sentence for example 21,219 then output is "twenty one thousand and two hundred nineteen" by using only control flow statements (only loops and switch case )?
Why string is used in c?
Explain function pointer with exapmles.