ASSIGNMENT 3 (CHAPTER 3 & 4)
- What are formatted input / output functions? Explain in detail. Why are they called formatted and unformatted?
- What is operator? Explain each operator .
- Explain the format of following with example:
printf()
scanf()
getchar()
putchar()
gets()
puts()
- Difference between getch() and getche().
- Why is semicolon used at the end of a statement?
- Write a program to multiply two numbers and display products. The program should ask the user for two numbers from the keyboard.
- Write a program to convert Cartesian coordinate to polar coordinate.
- Write a program to find compound interest for a given principal amount, time in years and rate in %.
- Write a program to read the height and base of a triangle and find the area of it.
- Write a program to illustrate the usage of all escape characters set available in C-programming language.(eg. \n,\t,\a etc.)
- What are the rules for naming an identifier? Name any 5 keywords.
- Solve the expression: [ans: a=11, b=23, c=241]=]
int a=2,b=3,c;
a=(b++) + (++b) +a;
c=a>b ? a:b;
b=(a++) + (b--) +a;
c=c++ * b--;