can we print any string without using terminator?
Answer Posted / 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 |
Post New Answer View All Answers
What are the 4 types of functions?
What is pass by reference in c?
What does return 1 means in c?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
What are the advantages of the functions?
What is calloc() function?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is meant by keywords in c?
In a switch statement, what will happen if a break statement is omitted?
What is string constants?
In C language, a variable name cannot contain?
Why can arithmetic operations not be performed on void pointers?
What is selection sort in c?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
Explain function?