Program to find larger of the two numbers without using if-else,while,for,switch
Answer Posted / amit
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
(a>b)?printf("a is larger") : printf(" b is larger ");
getch();
}
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
Explain how can you tell whether a program was compiled using c versus c++?
Give the rules for variable declaration?
Tell me is null always defined as 0(zero)?
How can you determine the size of an allocated portion of memory?
What is difference between Structure and Unions?
How can you pass an array to a function by value?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
In C programming, what command or code can be used to determine if a number of odd or even?
What is string concatenation in c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
Is void a keyword in c?
How to write a multi-statement macro?
What are types of functions?
What are the different types of linkage exist in c?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }