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 |
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
Derive expression for converting RGB color parameters to HSV values
can u give me the c codings for converting a string into the hexa decimal form......
Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.
I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).
#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
Write a program that reads a dynamic array of 40 integers and displays only even integers
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
How we will connect multiple client ? (without using fork,thread)
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }