leap yr = ((y%100!=0 && yr %400==0)?1:(yr%4==0)?1:0;
leap yr =1;
printf ("leap yr");
else
printf ("not leap yr");
write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)
You can use the ternary operator, in an expression such as: result = a > b ? a : b; This is equivalent to: if (a > b) result = a; else result = b;
You could use an if, but the ternary operator is especially compact for this purpose: result = a > b ? a : b;
write a c++program by using if statement to read a number and check whether it is positive or negative
π¬s9888hcof=GAy
To write a C program to determine if something is odd or even you need to be a programmer. To write a program in C is complicate and only done by programmers.
R = (A > B && A > C) ? A : (B > C) ? B : C; // parentheses not necessary - for clarity only
Write a program in C for showing working of different logical operator in C.Your program should guide users with proper message/menu on the console. (5 Marks)
Same with other Visual Basic program, programming in FoxPro will require you to have the right syntax.
Use the Exception class and type converters.
int max (int a, int b) { return a>b?a:b; }
May be link might help -> http://www.allinterview.com/viewpost/408298.html There it is implemented through...... Operator Overloading!