The code is::::: if(condition)
Printf("Hello");
Else
Printf("World");
What will be the condition in if in such a way that both
Hello and world are printed in a single attempt?????? Single
Attempt in the sense... It must first print "Hello" and it
Must go to else part and print "World"..... No loops,
Recursion are allowed........................
Answer Posted / anudyuti
#include <stdio.h>
int executeboth();
void main()
{
both();
}
int both()
{
static int i=0;
if(i++==0 ? executeboth():1)
{
printf ("Hello");
}
else
{
printf (" World");
}
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a void pointer? When is a void pointer used?
What are void pointers in c?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
swap 2 numbers without using third variable?
What is break in c?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
How can I recover the file name given an open stream or file descriptor?
Explain what is gets() function?
What is meant by type specifiers?
Is void a keyword in c?
Why do we use main function?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Explain how do you search data in a data file using random access method?
If the size of int data type is two bytes, what is the range of signed int data type?