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 is the different between if-else and switch statment (other than syntax)
26 Answers CTS, Oracle, Scorpos,
Why c is known as a mother language?
int i=10; printf("%d %d %d", i, i=20, i);
Differentiate between full, complete & perfect binary trees.
What is the most efficient way to count the number of bits which are set in an integer?
how to reverse string "Hello World" by using pointers only. Without any temp var
What is variable in c example?
What are the types of bitwise operator?
What is the difference between text files and binary files?
what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason
c program for searching a student details among 10 student details
What is hashing in c?