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 |
Why is it usually a bad idea to use gets()? Suggest a workaround.
What is strcpy() function?
Why is c used in embedded systems?
find largest element in array w/o using sorting techniques.
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Why is c still so popular?
What are keywords in c with examples?
How can I make it pause before closing the program output window?
2. Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers.
program for following output using for loop? 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5
What are qualifiers?
how to determine the complexity of an algorithm as log(n)