#include “stdio.h”
int id=3;
void main
{ int id=5;
{ int id;
id=7;
printf(“id=%d\n”, id );
}
printf(“id=%d\n”, id );
}
id=5
举一反三
- 以下程序段哪段是正确的() A: declare id int default 0; repeat set id=id+1; end repeat;<br> until id>=10; B: declare id int default 0; repeat set id=id+1; end repeat;<br> until id>=10 C: declare id int default 0; repeat set id=id+1; until id>=10 end repeat; D: declare id int default 0; repeat set id=id+1; until id>=10; end repeat;
- id是什么?int能否为id?如何封装成id?
- 有如下程序: #include<iostream> using namespace std; class Con char ID; public: Con():ID(’A)cout<<1; Con(char ID):ID(ID)cout<<2; Con(Con &c):ID(c.getID())cout<<3; char getID()constreturn ID; ; void show(Con c)cout<<c.getID(); int main() Con c1; show(c1); Con c2(’B’); show(c2); return 0; 执行上面程序的输出是( )。 A: 13A23A B: 23A13B C: 13A23B D: 13823A
- 阅读下面T-SQL语句,对变量赋值时存在错误的是( )(其中money为钱币数据类型,为其变量赋值可用或者不用$等货币符号)。 A: declare @id int ,@price money Set @id =100 Set @price=$2.21 B: declare @id int ,@price money Select @id=100,@price=2.21 C: declare @id int ,@price money set @id=100,@price=2.21 D: declare @id int ,@price money Select @id=100Select @price=$2.21
- hive里创建表test,表里添加两个字段id和name,以下哪个HQL是正确的( ) A: create test(id int, name string); B: create test(int id, string name); C: create table test(int id, string name); D: create table test(id int, name string)
内容
- 0
Use the following code to answer the following questions: int id = 0; cout [< "ID: "; cin ]> id; if (id == 1) cout << "Janet"; else if (id == 2 || id == 3) cout << "Mark"; else if (id == 4) cout << "Jerry"; else cout << "Sue"; (1) The above code display ____when the id variable contains the number 2? (2) The above code display ____when the id variable contains the number 4? (3) The above code display ____when the id variable contains the number 3? (4) The above code display ____when the id variable contains the number 8
- 1
为表TEST中ID列添加主键约束的语法是() A: ALTER TABLE TEST CHANGE( ID INT PRIMARY KEY) B: ALTER TABLE TEST ADD( ID INT PRIMARY KEY) C: ALTER TABLE TEST MODIFY( ID INT PRIMARY KEY) D: ALTER TABLE TEST ADD CONSTRAINT PK PRIMARY KEY (ID)
- 2
执行语句“a,b=1,1”后,以下结论正确的是( )。 A: id(a)、id(b)、id(1)各不相等 B: id(a)=id(b),但不同于id(1) C: id(a)=id(1),但不同于id(b) D: id(a)、id(b)、id(1)均相等
- 3
已知函数getStudent()定义为public Student getStudent(int ID),下列四个选项中可以与getStudent构成重载的方法是 A: private Student getStudent(int ID) B: public String getStudent(int ID) C: Student getStudent(String name) D: public Student get(int ID)
- 4
关于id选择器使用方法正确的是() A: #id B: id C: $id D: &id