This is a C Program to print any print statement without using semicolon.
Problem Description
This program prints any print statement without using semicolon.
Problem Solution
1. Use the print statement in the if or else condition.
Program/Source Code
Here is source code of the C Program to print any print statement without using semicolon. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
/*
* C Program to Print any Print Statement without using Semicolon
*/
#include <stdio.h>
void main()
{
if(printf("Hi.. Welcome to sanfoundry"))
{
}
}
Program Explanation
1. In the main function use the print statement stating “Hi.. Welcome to sanfoundry” inside the if condition.
2. Exit.
advertisement
advertisement
Runtime Test Cases
Output: Hi.. Welcome to sanfoundry
Sanfoundry Global Education & Learning Series – 1000 C Programs.
Here’s the list of Best Books in C Programming, Data-Structures and Algorithms
If you wish to look at other example programs on Simple C Programs, go to Simple C Programs. If you wish to look at programming examples on all topics, go to C Programming Examples.
If you find any mistake above, kindly email to [email protected]Related Posts:
- Practice BCA MCQs
- Practice Computer Science MCQs
- Watch Advanced C Programming Videos
- Check C Books
- Apply for C Internship