
在不使用分号的情况下打印任何字符串,我们需要了解标准输出的工作原理以及为什么使用分号。
分号是一种行结束语句,用于告诉程序该行在此结束。这里使用的标准打印语句printf是标准io库的一种方法。让我们深入了解printf()方法。
int printf(const char *format , ...)
This method returns an integer and has a set of arguments format and … . The format is a string that is printed in the output screen. And the … is the additional number of arguments that are given to the function based on the string.
The funnctions return the total number of character that is to be printed on the screen.
UsualToolCMS 是一款企业级的网站内容管理系统,由PHP+MYSQL编写,使用模板分离技术,支持创建多种类型的站点。 拥有UsualToolCMS便能快速同时在手机端与电脑端建立网站,通过UsualToolCMS能快速接入公众号,快速生成一个微信小程序及WEBAPP,真正的多站合一。互联网技术变得更简单。 升级说明: UsualToolCMS7.0.0604增加文字/图片自动水印系
77
Using this we can find ways to bypass the use of end of line statement while printing the statement. We can use some statements that do not require the end of LINE statement to execute like the for loop. We can use this to print are set a statement without using the semicolon.
There are several methods by which we can print statement without using the semicolon;
#include<stdio.h>
int main() {
if (printf("Tutorials point") )
{ }
}#include<stdio.h>
int main() {
switch (printf("Tutorials point") )
{ }
}#include<stdio.h>
int main() {
while (printf("Tutorials point") )
{ }
}#include<stdio.h>
#define Out printf("Tutorials point")
int main() {
switch (out)
{ }
}以上就是写一个C程序,打印“ Tutorials Point ”,不使用分号的详细内容,更多请关注php中文网其它相关文章!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号