有两个整型变量dog和cat,若要从磁盘文件把数据读到其中,正确的形式是______ 。
A: fscanf(dog ,2,1,fp);
B: fscanf(fp,"%d%d",&dog ,&cat);
C: fscanf(dog ,cat,2,1,fp);
D: fscanf(fp,"%d",&dog ,&cat);
A: fscanf(dog ,2,1,fp);
B: fscanf(fp,"%d%d",&dog ,&cat);
C: fscanf(dog ,cat,2,1,fp);
D: fscanf(fp,"%d",&dog ,&cat);
举一反三
- FILE*fp;有两个整型变量a和b,若要从文件把数据读到其中,正确的形式是: A: fscanf(fp,"%d%d",a,b); B: fscanf(fp,"%d%d",&a,&b); C: fscanf("%d%d",&a,&b,fp); D: fprintf(fp,"%d",a,b);
- FILE *fp; 有两个整型变量a和b, 若要从文件把数据读到其中, 正确的形式是: A: fscanf(fp,"%d%d",a ,b); B: fscanf(fp,"%d%d",&a ,&b); C: fscanf("%d%d",&a ,&b, fp); D: fprintf(fp,"%d",a ,b);
- 有两个整型变量dog和cat,若要从磁盘文件把数据读到其中,正确的形式是______
- 在前面几题的基础上,有子类Dog和Cat继承了父类Animal,如下空格的输出是以下哪个选项?dog = Dog(coco,small); cat = Cat(kawaii)>>> isinstance(dog, Animal)___________>>> isinstance(cat, Animal)___________>>> isinstance(dog, Dog)___________>>> isinstance(dog, Cat)____________
- 若Animal是Cat,Dog的父类,则下列选项中,正确的是() A: Animal animal = new Cat(); B: Animal a = new Cat(); Cat cat = (Cat) a; C: Animal animal = new Dog(); D: Cat cat = (Cat)new Dog();