Q1. WAP to practice math functions such as sin(), cos(), log(), pow(), sqrt() etc. by including <math.h> header file.
Q2. WAP to find roots of a quadratic equation (for D>=0 case).
Q3. WAP to format console output using '\n', '\t', '\b' within printf statement.
Q4. WAP to implement assignment operators such as += , -= , *=, /= %= etc.
Q5. Assignment operator assigns right hand side value to left hand side variable. Use this idea to interchange (swap) values of two variables. (Hint: You may need a third variable. Think like switching coffee and tea between two cups using a third cup).
Q6. WAP to shift left and shift right operators (>> and <<). Ask the application of this operator to your lab instructor.
Q7. WAP to utilize ternary operator (?:).
Q8. WAP using sizeof() function to find size of char, integer, long int, float and double.
Q9. WAP to divide two numbers and use type casting operation (e.g. mean = (double)sum/n;).
Q10. String is set of characters (one next to each other stored in the memory and not related to each other), e.g. ="abc123". WAP to practice type casting using the following functions. You can initialize a string using statement char *s="3.145" Then s is a string.