main()
{
printf("\nab");
printf("\bsi");
printf("\rha");
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
hai
Explanation:
\n - newline
\b - backspace
\r - linefeed
| Is This Answer Correct ? | 93 Yes | 13 No |
Answer / jane
<new line>ab<backspace>si<carriage return>ha
First, handle the backspace. Note that even though it is "non-erase", the next character to be output would overwrite what was backspaced over:
<new line>asi<carriage return>ha
Now, a carriage return means to go back to the beginning of the line. So the "ha" overwrites the "as" in "asi:
<new line>hai
Now, the cursor is currently sitting on the i, so the next character to be output would overwrite i.
| Is This Answer Correct ? | 34 Yes | 2 No |
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
What are segment and offset addresses?
How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number