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
Get Free Certificate of Merit in C Programming Now!
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.
Next Steps:
- Get Free Certificate of Merit in C Programming
- Participate in C Programming Certification Contest
- Become a Top Ranker in C Programming
- Take C Programming Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Related Posts:
- Apply for C Internship
- Watch Advanced C Programming Videos
- Practice Computer Science MCQs
- Buy C Books
- Buy Computer Science Books