代码搜索:printf
找到约 10,000 项符合「printf」的源代码
代码结果 10,000
www.eeworm.com/read/264377/11318252
c t_ttyname.c
#include "apue.h"
int
main(void)
{
char *name;
if (isatty(0)) {
name = ttyname(0);
if (name == NULL)
name = "undefined";
} else {
name = "not a tty";
}
printf("fd 0: %s\n", name);
if (
www.eeworm.com/read/409572/11318911
c 9-1.c
/* 9-1.c可生成噪声的主程序 */
#define FALSE 0
#define TRUE 1
#include
main()
{
int snd; /* which sound to produce */
int cnt; /* number of times to repeat sound */
int note; /* Cur
www.eeworm.com/read/409572/11318980
c 13-7.c
/*13-7.c*/
#include
#include
union message{
int s1[1000];
int s2[100][10];
} user;
main(int argc,char *argv[])
{ FILE *fp1,*fp2;
int t,t2,flag;
if((toupper(*argv[3])==
www.eeworm.com/read/409572/11319156
c al3_4.c
/*案例代码文件名:AL3_4.C。*/
main()
{char c='A';
int i=65;
printf("c=%c,%5c,%d\n",c,c,c);
printf("i=%d,%c",i,i);
}
www.eeworm.com/read/409572/11319183
c al4_3.c
/*案例代码文件名:AL4_3.C。*/
/*功能:说明if语句的嵌套格式和用法。*/
main()
{ int year,leap=0; /* leap=0:预置为非闰年*/
printf("Please input the year:");
scanf("%d",&year);
if (year % 4==0)
{if (year % 100 != 0)
www.eeworm.com/read/264291/11322709
awk extractdalrate.awk
BEGIN {
speed =0;
sent =0;
}
/Speed/ { speed = $3; }
/Sent data/ { sent = $4; }
/Delivered/ { printf"%d \t %d \t %d \n",speed, sent, $4;}
www.eeworm.com/read/409424/11327699
txt 经典c程序100例11--20.txt
【程序11】
题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月
后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
1.程序分析: 兔子的规律为数列1,1,2,3,5,8,13,21....
2.程序源代码:
main()
{
long f1,f2;
int i;
f1=f2=1;
for(i=1;i
www.eeworm.com/read/263973/11334909
c bp.c
#include "math.h"
#include "time.h"
#include "stdio.h"
#include "stdlib.h"
#define Ni 1
#define Nm 4
#define No 1
#define L 100
#define Enom 0.02
#define loopmax 100000
#define e 2.71828
do
www.eeworm.com/read/409272/11337534
c address.c
#include
void main(void)
{
int count = 1;
float salary = 40000.0;
long distance = 1234567L;
printf("Address of count is %x\n", &count);
printf("Address of salary i
www.eeworm.com/read/409272/11337645
c memcmp.c
#include
#include
void main(void)
{
char *a = "AAA";
char *b = "BBB";
char *c = "aaa";
printf("Comparing %s and %s with memcmp %d\n",
a, b, memcmp(a, b,