本文介绍了%dn是格式字符串吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在代码中碰到了这一行-

I recently came across this line in a code -

fprintf(logfile,"   |-IP Version        : %dn",(unsigned int)iph->version);

这里的%dn"是格式字符串吗?如果是这样,那意味着什么?

Is "%dn" here a format string ? If so , what does it signify ?

推荐答案

听起来好像有人想写%d\n以换行符终止行,但是反斜线在某处丢失了.格式代码无论如何都以"d"结尾.

It sounds a bit like someone wanted to write %d\n to terminate the line with a linefeed, but the backslash got lost somewhere. The format code, in any case, ends with the "d".

这篇关于%dn是格式字符串吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 09:53