Program to find larger of the two numbers without using if-else,while,for,switch
Answer Posted / kristian vitozev
#include <stdio.h>
int main(void)
{
int a = 7, b = 25;
a>b ? printf("%d [a]",a) : printf("%d [b]", b);
return 0;
}
| Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
What is the advantage of an array over individual variables?
What is double pointer in c?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
Is main is user defined function?
What is a char in c?
what is the syallabus of computer science students in group- 1?
What is include directive in c?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
Write a program to swap two numbers without using third variable in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
What are the types of pointers in c?
Why do we use return in c?
What is the right way to use errno?
When is a “switch” statement preferable over an “if” statement?
What is the use of printf() and scanf() functions?