一个简单的C问题

作者&投稿:闫劳 (若有异议请与网页底部的电邮联系)
给一个最简单的C程序~

#include
int main(void)
{
printf("hello!");
return 0;
}

你是刚开始学C语言吧,呵呵,这个就是最简单的了,而且移植性很好,任何一款C编译器都可以通过编译,并且在linux系统上也可以编译和运行.
简单解释一下:
printf("hello!");会在屏幕上输出hello!这句话,你可以把双引号中的内容换成你想要显示的内容.

问题不大,你只需要在gets(word);前面添加一句scanf(“%c”,&c),用于接收空格字符就行(记得再定义一个c);
还有一个问题,你的程序就统计小写字母对,其他的都是错的,尽量自己解决,不行的话再追问我!
不明白继续追问

标准输入输出库函数。源码如下:
/*
* stdio.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Definitions of types and prototypes of functions for standard input and
* output.
*
* NOTE: The file manipulation functions provided by Microsoft seem to
* work with either slash (/) or backslash (\) as the directory separator.
*
*/

#ifndef _STDIO_H_
#define _STDIO_H_

/* All the headers include this file. */
#include <_mingw.h>

#ifndef RC_INVOKED
#define __need_size_t
#define __need_NULL
#define __need_wchar_t
#define __need_wint_t
#include <stddef.h>
#define __need___va_list
#include <stdarg.h>
#endif /* Not RC_INVOKED */

/* Flags for the iobuf structure */
#define _IOREAD 1 /* currently reading */
#define _IOWRT 2 /* currently writing */
#define _IORW 0x0080 /* opened as "r+w" */

/*
* The three standard file pointers provided by the run time library.
* NOTE: These will go to the bit-bucket silently in GUI applications!
*/
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

/* Returned by various functions on end of file condition or error. */
#define EOF (-1)

/*
* The maximum length of a file name. You should use GetVolumeInformation
* instead of this constant. But hey, this works.
* Also defined in io.h.
*/
#ifndef FILENAME_MAX
#define FILENAME_MAX (260)
#endif

/*
* The maximum number of files that may be open at once. I have set this to
* a conservative number. The actual value may be higher.
*/
#define FOPEN_MAX (20)

/* After creating this many names, tmpnam and tmpfile return NULL */
#define TMP_MAX 32767
/*
* Tmpnam, tmpfile and, sometimes, _tempnam try to create
* temp files in the root directory of the current drive
* (not in pwd, as suggested by some older MS doc's).
* Redefining these macros does not effect the CRT functions.
*/
#define _P_tmpdir "\\"
#ifndef __STRICT_ANSI__
#define P_tmpdir _P_tmpdir
#endif
#define _wP_tmpdir L"\\"

/*
* The maximum size of name (including NUL) that will be put in the user
* supplied buffer caName for tmpnam.
* Inferred from the size of the static buffer returned by tmpnam
* when passed a NULL argument. May actually be smaller.
*/
#define L_tmpnam (16)

#define _IOFBF 0x0000 /* full buffered */
#define _IOLBF 0x0040 /* line buffered */
#define _IONBF 0x0004 /* not buffered */

#define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */
#define _IOEOF 0x0010 /* EOF reached on read */
#define _IOERR 0x0020 /* I/O error from system */
#define _IOSTRG 0x0040 /* Strange or no file descriptor */
#ifdef _POSIX_SOURCE
# define _IOAPPEND 0x0200
#endif
/*
* The buffer size as used by setbuf such that it is equivalent to
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
*/
#define BUFSIZ 512

/* Constants for nOrigin indicating the position relative to which fseek
* sets the file position. Enclosed in ifdefs because io.h could also
* define them. (Though not anymore since io.h includes this file now.) */
#ifndef SEEK_SET
#define SEEK_SET (0)
#endif

#ifndef SEEK_CUR
#define SEEK_CUR (1)
#endif

#ifndef SEEK_END
#define SEEK_END (2)
#endif

#ifndef RC_INVOKED

#ifndef __VALIST
#ifdef __GNUC__
#define __VALIST __gnuc_va_list
#else
#define __VALIST char*
#endif
#endif /* defined __VALIST */

/*
* The structure underlying the FILE type.
*
* Some believe that nobody in their right mind should make use of the
* internals of this structure. Provided by Pedro A. Aranda Gutiirrez
* <paag@tid.es>.
*/
#ifndef _FILE_DEFINED
#define _FILE_DEFINED
typedef struct _iobuf
{
char* _ptr;
int _cnt;
char* _base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char* _tmpfname;
} FILE;
#endif /* Not _FILE_DEFINED */

/*
* The standard file handles
*/
#ifndef __DECLSPEC_SUPPORTED

extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */

#define _iob (*_imp___iob) /* An array of FILE */

#else /* __DECLSPEC_SUPPORTED */

__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */

#endif /* __DECLSPEC_SUPPORTED */

#define stdin (&_iob[STDIN_FILENO])
#define stdout (&_iob[STDOUT_FILENO])
#define stderr (&_iob[STDERR_FILENO])

#ifdef __cplusplus
extern "C" {
#endif

/*
* File Operations
*/
_CRTIMP FILE* __cdecl fopen (const char*, const char*);
_CRTIMP FILE* __cdecl freopen (const char*, const char*, FILE*);
_CRTIMP int __cdecl fflush (FILE*);
_CRTIMP int __cdecl fclose (FILE*);
/* MS puts remove & rename (but not wide versions) in io.h also */
_CRTIMP int __cdecl remove (const char*);
_CRTIMP int __cdecl rename (const char*, const char*);
_CRTIMP FILE* __cdecl tmpfile (void);
_CRTIMP char* __cdecl tmpnam (char*);

#ifndef __STRICT_ANSI__
_CRTIMP char* __cdecl _tempnam (const char*, const char*);
_CRTIMP int __cdecl _rmtmp(void);

#ifndef NO_OLDNAMES
_CRTIMP char* __cdecl tempnam (const char*, const char*);
_CRTIMP int __cdecl rmtmp(void);
#endif
#endif /* __STRICT_ANSI__ */

_CRTIMP int __cdecl setvbuf (FILE*, char*, int, size_t);

_CRTIMP void __cdecl setbuf (FILE*, char*);

/*
* Formatted Output
*/

_CRTIMP int __cdecl fprintf (FILE*, const char*, ...);
_CRTIMP int __cdecl printf (const char*, ...);
_CRTIMP int __cdecl sprintf (char*, const char*, ...);
_CRTIMP int __cdecl _snprintf (char*, size_t, const char*, ...);
_CRTIMP int __cdecl vfprintf (FILE*, const char*, __VALIST);
_CRTIMP int __cdecl vprintf (const char*, __VALIST);
_CRTIMP int __cdecl vsprintf (char*, const char*, __VALIST);
_CRTIMP int __cdecl _vsnprintf (char*, size_t, const char*, __VALIST);

#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl snprintf(char* s, size_t n, const char* format, ...);
__CRT_INLINE int __cdecl
vsnprintf (char* s, size_t n, const char* format, __VALIST arg)
{ return _vsnprintf ( s, n, format, arg); }
int __cdecl vscanf (const char * __restrict__, __VALIST);
int __cdecl vfscanf (FILE * __restrict__, const char * __restrict__,
__VALIST);
int __cdecl vsscanf (const char * __restrict__,
const char * __restrict__, __VALIST);
#endif

/*
* Formatted Input
*/

_CRTIMP int __cdecl fscanf (FILE*, const char*, ...);
_CRTIMP int __cdecl scanf (const char*, ...);
_CRTIMP int __cdecl sscanf (const char*, const char*, ...);
/*
* Character Input and Output Functions
*/

_CRTIMP int __cdecl fgetc (FILE*);
_CRTIMP char* __cdecl fgets (char*, int, FILE*);
_CRTIMP int __cdecl fputc (int, FILE*);
_CRTIMP int __cdecl fputs (const char*, FILE*);
_CRTIMP char* __cdecl gets (char*);
_CRTIMP int __cdecl puts (const char*);
_CRTIMP int __cdecl ungetc (int, FILE*);

/* Traditionally, getc and putc are defined as macros. but the
standard doesn't say that they must be macros.
We use inline functions here to allow the fast versions
to be used in C++ with namespace qualification, eg., ::getc.

_filbuf and _flsbuf are not thread-safe. */
_CRTIMP int __cdecl _filbuf (FILE*);
_CRTIMP int __cdecl _flsbuf (int, FILE*);

#if !defined _MT

__CRT_INLINE int __cdecl getc (FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) *__F->_ptr++
: _filbuf (__F);
}

__CRT_INLINE int __cdecl putc (int __c, FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
: _flsbuf (__c, __F);
}

__CRT_INLINE int __cdecl getchar (void)
{
return (--stdin->_cnt >= 0)
? (int) (unsigned char) *stdin->_ptr++
: _filbuf (stdin);
}

__CRT_INLINE int __cdecl putchar(int __c)
{
return (--stdout->_cnt >= 0)
? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
: _flsbuf (__c, stdout);}

#else /* Use library functions. */

_CRTIMP int __cdecl getc (FILE*);
_CRTIMP int __cdecl putc (int, FILE*);
_CRTIMP int __cdecl getchar (void);
_CRTIMP int __cdecl putchar (int);

#endif

/*
* Direct Input and Output Functions
*/

_CRTIMP size_t __cdecl fread (void*, size_t, size_t, FILE*);
_CRTIMP size_t __cdecl fwrite (const void*, size_t, size_t, FILE*);

/*
* File Positioning Functions
*/

_CRTIMP int __cdecl fseek (FILE*, long, int);
_CRTIMP long __cdecl ftell (FILE*);
_CRTIMP void __cdecl rewind (FILE*);

#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
/*
* Workaround for limitations on win9x where a file contents are
* not zero'd out if you seek past the end and then write.
*/

int __cdecl __mingw_fseek (FILE *, long, int);
int __cdecl __mingw_fwrite (const void*, size_t, size_t, FILE*);
#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
#endif /* __USE_MINGW_FSEEK */

/*
* An opaque data type used for storing file positions... The contents of
* this type are unknown, but we (the compiler) need to know the size
* because the programmer using fgetpos and fsetpos will be setting aside
* storage for fpos_t structres. Actually I tested using a byte array and
* it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
* Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
* MSVCRT however, and for now `long long' will do.
*/
#ifdef __MSVCRT__
typedef long long fpos_t;
#else
typedef long fpos_t;
#endif

_CRTIMP int __cdecl fgetpos (FILE*, fpos_t*);
_CRTIMP int __cdecl fsetpos (FILE*, const fpos_t*);

/*
* Error Functions
*/

_CRTIMP int __cdecl feof (FILE*);
_CRTIMP int __cdecl ferror (FILE*);

#ifdef __cplusplus
inline int __cdecl feof (FILE* __F)
{ return __F->_flag & _IOEOF; }
inline int __cdecl ferror (FILE* __F)
{ return __F->_flag & _IOERR; }
#else
#define feof(__F) ((__F)->_flag & _IOEOF)
#define ferror(__F) ((__F)->_flag & _IOERR)
#endif

_CRTIMP void __cdecl clearerr (FILE*);
_CRTIMP void __cdecl perror (const char*);

#ifndef __STRICT_ANSI__
/*
* Pipes
*/
_CRTIMP FILE* __cdecl _popen (const char*, const char*);
_CRTIMP int __cdecl _pclose (FILE*);

#ifndef NO_OLDNAMES
_CRTIMP FILE* __cdecl popen (const char*, const char*);
_CRTIMP int __cdecl pclose (FILE*);
#endif

/*
* Other Non ANSI functions
*/
_CRTIMP int __cdecl _flushall (void);
_CRTIMP int __cdecl _fgetchar (void);
_CRTIMP int __cdecl _fputchar (int);
_CRTIMP FILE* __cdecl _fdopen (int, const char*);
_CRTIMP int __cdecl _fileno (FILE*);
_CRTIMP int __cdecl _fcloseall(void);
_CRTIMP FILE* __cdecl _fsopen(const char*, const char*, int);
#ifdef __MSVCRT__
_CRTIMP int __cdecl _getmaxstdio(void);
_CRTIMP int __cdecl _setmaxstdio(int);
#endif

#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl fgetchar (void);
_CRTIMP int __cdecl fputchar (int);
_CRTIMP FILE* __cdecl fdopen (int, const char*);
_CRTIMP int __cdecl fileno (FILE*);
#endif /* Not _NO_OLDNAMES */

#define _fileno(__F) ((__F)->_file)
#ifndef _NO_OLDNAMES
#define fileno(__F) ((__F)->_file)
#endif

#if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
#include <sys/types.h>
__CRT_INLINE FILE* __cdecl fopen64 (const char* filename, const char* mode)
{
return fopen (filename, mode);
}

int __cdecl fseeko64 (FILE*, off64_t, int);

#ifdef __USE_MINGW_FSEEK
int __cdecl __mingw_fseeko64 (FILE *, off64_t, int);
#define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)
#endif

__CRT_INLINE off64_t __cdecl ftello64 (FILE * stream)
{
fpos_t pos;
if (fgetpos(stream, &pos))
return -1LL;
else
return ((off64_t) pos);
}
#endif /* __NO_MINGW_LFS */

#endif /* Not __STRICT_ANSI__ */

/* Wide versions */

#ifndef _WSTDIO_DEFINED
/* also in wchar.h - keep in sync */
_CRTIMP int __cdecl fwprintf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl wprintf (const wchar_t*, ...);
_CRTIMP int __cdecl swprintf (wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
_CRTIMP int __cdecl vfwprintf (FILE*, const wchar_t*, __VALIST);
_CRTIMP int __cdecl vwprintf (const wchar_t*, __VALIST);
_CRTIMP int __cdecl vswprintf (wchar_t*, const wchar_t*, __VALIST);
_CRTIMP int __cdecl _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
_CRTIMP int __cdecl fwscanf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl wscanf (const wchar_t*, ...);
_CRTIMP int __cdecl swscanf (const wchar_t*, const wchar_t*, ...);
_CRTIMP wint_t __cdecl fgetwc (FILE*);
_CRTIMP wint_t __cdecl fputwc (wchar_t, FILE*);
_CRTIMP wint_t __cdecl ungetwc (wchar_t, FILE*);

#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl fgetws (wchar_t*, int, FILE*);
_CRTIMP int __cdecl fputws (const wchar_t*, FILE*);
_CRTIMP wint_t __cdecl getwc (FILE*);
_CRTIMP wint_t __cdecl getwchar (void);
_CRTIMP wchar_t* __cdecl _getws (wchar_t*);
_CRTIMP wint_t __cdecl putwc (wint_t, FILE*);
_CRTIMP int __cdecl _putws (const wchar_t*);
_CRTIMP wint_t __cdecl putwchar (wint_t);
_CRTIMP FILE* __cdecl _wfdopen(int, wchar_t *);
_CRTIMP FILE* __cdecl _wfopen (const wchar_t*, const wchar_t*);
_CRTIMP FILE* __cdecl _wfreopen (const wchar_t*, const wchar_t*, FILE*);
_CRTIMP FILE* __cdecl _wfsopen (const wchar_t*, const wchar_t*, int);
_CRTIMP wchar_t* __cdecl _wtmpnam (wchar_t*);
_CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl _wrename (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl _wremove (const wchar_t*);
_CRTIMP void __cdecl _wperror (const wchar_t*);
_CRTIMP FILE* __cdecl _wpopen (const wchar_t*, const wchar_t*);
#endif /* __MSVCRT__ */

#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
__CRT_INLINE int __cdecl
vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
{ return _vsnwprintf ( s, n, format, arg);}
int __cdecl vwscanf (const wchar_t * __restrict__, __VALIST);
int __cdecl vfwscanf (FILE * __restrict__,
const wchar_t * __restrict__, __VALIST);
int __cdecl vswscanf (const wchar_t * __restrict__,
const wchar_t * __restrict__, __VALIST);
#endif

#define _WSTDIO_DEFINED
#endif /* _WSTDIO_DEFINED */

#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__
#ifndef NO_OLDNAMES
_CRTIMP FILE* __cdecl wpopen (const wchar_t*, const wchar_t*);
#endif /* not NO_OLDNAMES */
#endif /* MSVCRT runtime */

/*
* Other Non ANSI wide functions
*/
_CRTIMP wint_t __cdecl _fgetwchar (void);
_CRTIMP wint_t __cdecl _fputwchar (wint_t);
_CRTIMP int __cdecl _getw (FILE*);
_CRTIMP int __cdecl _putw (int, FILE*);

#ifndef _NO_OLDNAMES
_CRTIMP wint_t __cdecl fgetwchar (void);
_CRTIMP wint_t __cdecl fputwchar (wint_t);
_CRTIMP int __cdecl getw (FILE*);
_CRTIMP int __cdecl putw (int, FILE*);
#endif /* Not _NO_OLDNAMES */

#endif /* __STRICT_ANSI */

#ifdef __cplusplus
}
#endif

#endif /* Not RC_INVOKED */

#endif /* _STDIO_H_ */

标准输入输出库

standard input/output

标准输入设备通常指键盘。

标准输出设备为显示器。

用来控制从键盘获取字符,和把字符显示到显示器。


一个简单的c语言递归代码问题,想了半天始终理解不了
看看下面的图示过程 先算n-1,算出age(1)后再+2递推 这是整个递归过程

C语言简单的一个问题
有个很搞笑的问题,很小的整数(整个Z域?)?确定不是自然数?很小的值在做自减的时候直接就溢出了。这出题的人语文或数学没学好。这个题不需要你用多余的内存去存运算结果。你直接输入a后(scanf("%d",&a))用5行printf输出就行。include "stdio.h"int main() { int a; scanf("%d", ...

求大神解答一道简单的c语言编程问题。 题目:编一函数实现一个n*n的矩 ...
include <stdio.h>#include<stdlib.h>#include<math.h>void Transpose(int a[][10],int n);main(){int n; \/\/储存矩阵的大小int i,j; int a[10][10]={0}; \/\/定义一个最大范围的数组储存矩阵printf("Input n:");scanf("%d",&n);\/\/用户按顺序输入一个矩阵printf("Input %d*...

C语言简单问题?
如果输入的big1是:123456789999999999 程序逆向排序为:999999999987654321 对big2同样的处理,然后就可以按位计算合计存入big3 整个程序,关键的就是两个函数,第一个是计算求和的:void big_sum(char a[], char b[], char c[]);函数的功能是计算超大整数的加法:c=a+b 第二个是逆向字符串的...

一个很简单的c语言问题
X=3 Y=6 Z=2这是程序全部运行完后的结果

一些简单C语言编程问题
第一个 include<stdio.h> main(){ int days,day,t=1;long msr=1,fw;\/\/msr=陌生人,fw=富翁 scanf("%d",&days);if(days<=30&&days>=0)if(days==1)fw=100000;msr=1;for(day=2;day<=days;day++){ fw=100000*day;t=t*2;msr=msr+t;} printf("%d\\n%d\\n",fw,msr);} 这里...

两道简单的C语言编程题 1.设给定三个整数a.b.c,试写出寻找其中数的一...
先回答第一个问题:include <stdio.h>#include <conio.h>int main(){ int a,b,c,d; printf("Input a,b,c:"); scanf("%d,%d,%d",&a,&b,&c); if(a>=b){ if(b>=c)d=b; \/\/a >= b >= c ,比较2次 else if(a>=c)d=c; \/\/a >= c > b ,比较3次 else d...

一个很简单的C语言问题,我就是想实现:输入一系列数字,然后以0为标志结 ...
建议你先全部初始化为,再用do while 或者先输入a[0] 再循环。而且,最近老是看见人用 fflush(stdin); 有必要吗。。。问一下,你的输入数据是怎么输入的,如果是 先将所有数据都输入再按回车的话就有问题了。因为你所有数据都在缓冲区里,你读完一个数据之后就清空缓冲区了,结果后面的...

C语言很简单一个小问题
这应该是VC在debug版本中设计,程序改动如下:include "stdio.h"int max(int ,int );void main(){int (*p)(int,int);int a=5;int b=3;p=max;printf("the max is %d\\n",p(a,b));printf("\\np = %d",p);printf("\\n*p = %d",*p);printf("\\nmax = %d",max);}int max(int...

一个C语言简单问题——int fun(int n)是什么意思
2、函数有一个整型的参数,也就是说在函数调用时必须要给它一个整型数作为参数。fun()函数内部的C+=fun(i-2)实际上表明这个函数采用了递归型算法。递归做为一种算法在程序设计语言中广泛应用,就是指一个过程或函数在其定义或说明中有直接或间接调用自身的一种方法,它通常把一个大型复杂的问题层层...

松阳县18376475463: 一个很简单的C语言问题 -
晋春吉舒: 答案是2 1/2当做整型来处理的 结果为0 #include<stdio.h> main() {double x,y;x=2;y=x+1/2;printf("%f\n",y); } 执行结果为2.000000 如果y=x+1.0/2的话,则结果为2.500000

松阳县18376475463: 一个简单的C语言问题 -
晋春吉舒: #include float f(int x) { if(x==0||x==2)return 0.0; else if(x>0) return ( x+1.0)/(x-2.0); else return ( x - 1.0)/(x -2.0); } int main() { int n,i; float S; scanf("%d",&n); S=0; for(i=-n;i S+=f(i); printf("\n result = %f",S); return 0; }

松阳县18376475463: 简单的C语言问题 -
晋春吉舒: main() int a,b,c,t; scanf("%d%d%d",&a,&b,&c); /* 输入三个数 */ printf("a=%d,b=%d,c=%d",a,b,c); /* 做比较用 */ t=a;a=b;b=t; /* 现在b原来的值变成了a的值,a原来的值变成了b的值 */ t=a;a=c;c=t; /* 这时候 a的值(其实是b的原值) 变成了c的值,也就等于b 的值给了C;*/同时C的值也给a printf("%4d,%4d,%4d",a,b,c); }

松阳县18376475463: 一个简单的c语言问题 -
晋春吉舒: 严格来说,这段代码有两个错误:第一,c=a\b错了,除号应该是“/”,应该改为c=a/b;第二,最后一句末尾忘记加分号了,应该为:printf("c=%d,d=%d",c,d);

松阳县18376475463: 一个简单的C题 -
晋春吉舒: # include <stdio.h> main() {char s[5],c[5],d[6]; printf("do you like cat or dog?"); scanf("%s",&s); strcpy(c,"dog"); strcpy(d,"asdgg"); if(s==c) printf("the code is:%s",d); else printf("the answer is wrong"); }

松阳县18376475463: C语言一个简单的问题 -
晋春吉舒: A正确,这是转义字符,不要去联想十六进制数的表示,只要记住转义字符如果要用十六进制表示就要以\x开头.A是用16进制数字表示的转义字符,表示ASCII值是十六进制13(即十进制19)的字符.B本意是用三位八进制数字表示转义字符,但是八进制数字中没有8,所以错误 C是"多字节字符",不是传统意义上的字符.D是一个字符串,不是字符.

松阳县18376475463: 一个超级简单的C语言问题 -
晋春吉舒: ....|| 要换成 &&a=max, b=max, c=max要掉个个;max=a, max=b, max=c

松阳县18376475463: 很简单的C问题! -
晋春吉舒: if ( *a ) //判断*a是否为真,即是否到字符串的末尾fun函数是通过嵌套调用实现的.调fun(s){ fun(s+1) { fun(s+2) { fun(s+3) fun(s+4) 打印d 打印c } 打印b...

松阳县18376475463: 一个简单的C语言题目. -
晋春吉舒: 定义的a,是LONG型,也就是长整形,第一个程序先强制转成整形输出,由于数据冗余,所以输出的是0,然后又强制转回长整形,所以输出1,第二个程序是先输出长整形数,所以输出原值,然后强制转为整形,所以输出的是0

松阳县18376475463: 一道简单的C程序问题.
晋春吉舒:#include<stdio.h> int main() { char str1[256]; char c; int i,j=0,k; str1[0]=getchar(); i=0; for(;(c=getchar())!='\n';) { for(k=0;k<=j;k++) { if(c==str1[j]) ; else { str1[j+1]=c; j++; } } } for(i=0;i<=j-1;i++) printf("%c",str1[i]); printf("\n"); return 0; } 582005627

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网