Вы находитесь на странице: 1из 1

What will be output of following program fragment: int a = 10, b; a >=5 ?

b=100: b=200; printf("%d\n", b); return 0; Q: WAP using Conditional operator check whether any number is +ve or ve or 0.

Q: WAP using Conditional operator to find and maximum and minimum of two numbers .

Write a C program which perform mathematical operation addition, subtraction, mu ltiplication, division, square and square root function. Make separate module fo r all mathematical operations. Write a function to calculate the gross salary of a employee if his basic salary is input through the keyboard. if basic salary is less than Rs.1500 then HRA = Rs. 500 and DA = 90% of basic. If salary is equal or greater than 1500 then HRA = 10% and DA = 95% of basic sa lary. Basic salary is passed to the function and gs salary is returned Write a C program to swap the two numbers. Pass the two number to swap as argume nt to function. Write a C program to swap the two numbers without using any third (Temporary) va riable. Pass the two number to swap as argument to function. Compute the roots of quadratic equation. ax2 + bx + c = 0 Write a function quad(a,b,c,sign) to find roots of a quadratic equation and call this function in main(). Use ternary operator for condition checking.

Вам также может понравиться