标识符

题1

下列的(   )不是C语言合法的标识符。
A)    main
B)    define
C)    sqrt
D)    const
E)    Long
F)    β
G)    delta
H)    __LINE_NO__
I)    sizeof
J)    type
K)    msgNo
L)    last  name
M)    3xg
N)    _3xg
O)    _123
P)    x3g
Q)    void
R)    RETURN
S)    register
T)    strLen
U)    Char
V)    isn’t
W)    when
X)    real
Y)    complex
Z)    function
#include<stdio.h>
int main() {
	printf("DFILMQSV");
}

题2

在C语言的程序中使用的变量名、函数名、标号等统称为标识符。下述(    )不是C语言合法的标识符。
A) x
B) enum
C) delta
D) _3x
E) 4th
F) BOOK1
G) π
H) X5aD
I) printf
J) INT
K) _float
L) static
M) CM_PER_INCH
N) x*y
O) sum5
P) isn’t
Q) o_no_o_no
R) sqrt
S) first  name
T) sizeof
U) bowy-1
V) xYshould
#include <stdio.h>
int main() {
    printf("BEGLNPSTU\n");
    return 0;
}

题3

在C语言的程序中使用的变量名、函数名、标号等统称为标识符。下述(    )不是C语言合法的标识符。

A)default
B)Long
C)signed
D)Switch
E)Void
F)main
G)include
H)define
I)printf
J)scanf
K)INT
L)integer
M)real
N)page_no
O)strLen
P)DBL_MAX
Q)delta
R)_3x
S)sum5
T)3s
U)s*T
V)-3x
W)bowy-1
X)last name
Y)β
Z)inta
#include<stdio.h>
int main()
{
	printf("ACTUVWXY");
	return 0;
}

题4

下面符合C标识符规定的有:(   )
A)#x   B)3ds   C)limit   D)define   E)_double   F)α   G)Int 
#include<stdio.h>
int main() {
	printf("CDEG");
}
 static char* keys[]= {"auto","short","int","long","float","double","char","struct","union","enum","typedef","const",
"unsigned","signed","extern","register","static","volatile","void","if","else","switch","else","for","do","while",
"goto","continue","break","default","sizeof","return"};


posted @ 2024-10-26 15:33  某朝  阅读(42)  评论(0)    收藏  举报