Program to find larger of the two numbers without using if-else,while,for,switch

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int a=90 , b=-89;
(a>b)?printf("a is larger") : printf(" b is larger ");
getch();
}

thank u

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the equivalent code of the following statement in WHILE LOOP format?

764


What are high level languages like C and FORTRAN also known as?

683


What is the collection of communication lines and routers called?

610


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

1627


What is data types?

637






How can I generate floating-point random numbers?

601


can anyone please tell about the nested interrupts?

1674


What is #include stdio h?

680


What are local static variables?

616


Discuss the function of conditional operator, size of operator and comma operator with examples.

676


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

613


What are derived data types in c?

607


Is c is a low level language?

560


What tq means in chat?

579


How will you write a code for accessing the length of an array without assigning it to another variable?

612