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 |
How does the C program handle segmentation faults?
What is graph in c?
simple c program for 12345 convert 54321 with out using string
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300,200,100
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..???
7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above
biggest of two no's with out using if condition statement
How we can write a value to an address using macro..?
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a
Why is this loop always executing once?
What is chain pointer in c?