can we print any string without using terminator?
Answers were Sorted based on User's Feedback
Answer / yogesh bansal
Yes, We can print the string without using the terminator.
like this
#include <stdio.h>
int main()
{
if(printf("this is yogesh"))
{
printf("then you must be good boy");
}
return 0;
}
Its a working example. when the control comes to if()
statement. first it will execute the printf statement inside
if() and the printf function will return number of character
printed which is an integer value and if() is true for any
value greater than 0. so it will go inside and execute the
rest of the code.
Hope the explanation is clear to you.
| Is This Answer Correct ? | 30 Yes | 3 No |
Answer / ashutosh
the format should b like this
void main()
{
if(printf("i luv u deepa")
{
}
}
| Is This Answer Correct ? | 17 Yes | 3 No |
What does it mean when the linker says that _end is undefined?
What are the basic data types associated with c?
What 'lex' does?
C passes By value or By reference?
5 Answers Geometric Software, Infosys,
discuss the steps needed to get a program from source code to executable in a system?
can u suggest me am in a confusion to choose whether to go to c programming or a software testing . am a graduate in B.sc(electronics).
In scanf h is used for
Why is c called c?
Are c and c++ the same?
In C programming, what command or code can be used to determine if a number of odd or even?
What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?
is forign key will be unique key any table or not?