C语言程序分析题,

来源:百度知道 编辑:UC知道 时间:2024/06/04 17:57:47
1.#inc1ude <stdio.h>
Void main(void)
{
int a=10,b=11;
int c=0,d=0;
printf(〃%5d,%5d\n〃 ,a++,--b);
printf(〃%5d〃,a&&b);
printf(〃%5d〃,!a);
printf(〃%d\n〃,!c); '
printf(〃%5d〃,d+=a);

要求注明输出格式!

2. #include(stdio. h)
int a=1,b;
void fun (void) ;
void main (void)
{ static int c;
int b=-5;
printf ("a=%d,b=%d, c=%d\n"
fun();
a+=1 ; c+=2;
printf ("a=%d,b=%d, c=%d\n"

void fun()
{ int c=10;
a+=1 ; b+=2;
printf ("a=%d,b=%d,c=%d\n"

.#inc1ude <stdio.h>
Void main(void)
{
int a=10,b=11;
int c=0,d=0;
printf(〃%5d,%5d\n〃 ,a++,--b);
printf(〃%5d〃,a&&b);
printf(〃%5d〃,!a);
printf(〃%d\n〃,!c); '
printf(〃%5d〃,d+=a);

***10,***10****1****01
***11(不知道)

#include(stdio. h)
int a=1,b;
void fun (void) ;
void main (void)
{ static int c;
int b=-5;
printf ("a=%d,b=%d, c=%d\n",a,b,c);
fun();
a+=1 ; c+=2;
printf ("a=%d,b=%d, c=%d\n",a,b,c);

void fun()
{ int c=10;
a+=1 ; b+=2;
printf ("a=%d,b=%d,c=%d\n",a,b,c);

a=1,b=-5,*c=(随机)
a=2,b=(随机), c=10
a=2,b=-5, c=(随机)

10 10
1 01
11

a=1,b=-5,*c=(任意)
a=2,b=(任意), c=10
a=2,b=-5, c=(任意)

你编译好运行一下不就知道了

c是全局的,最后一个c=12吧