NEW
Font size
WorksheetsC++ Faili (1)
Total questions: 12
Worksheet time: 6mins
Kāda bibliotēka tiek izmantota darbībām ar failiem C++?
What header file is used for handling file operations in C++?
<iostream>
<fstream>
<filestream>
<fileio>
Pēc noklusējuma visi faili tiek atvērti ____ režīmā
By default, all the files are opened in ____ mode
binary
text
nevaru pateikt
can't say
Kā atvērt failu ar nosaukumu "data.txt" rakstīšanai?
How do you open a file named "data.txt" for writing?
file.open("data.txt", ios:: output);
file.open("data.txt", ios::out);
file.open("data.txt", ios::in);
file.open("data.txt", ios::write);
Kāds ir pareizais veids, kā pārbaudīt, vai fails ir veiksmīgi atvērts?
What is the correct way to check if a file is successfully opened?
if (file.is_open())
if (file.opened())
if (file.success())
if (file.available())
Kā ierakstīt tekstu "Sveika, pasaule!" teksta failā?
How do you write a string "Hello, World!" to an opened text file?
file << "Hello, World!";
file.write("Hello, World!");
file.print("Hello, World!");
file.text("Hello, World!");
Kāda funkcija tiek izmantota lai aizvērtu failu?
In text file handling, what function is used to close a file?
file.shutdown();
file.end();
file.close();
file.terminate();
Kā pārvietot faila rādītāju uz binārā faila sākumu?
How do you move the file pointer to the beginning of a binary file?
file.reset();
file.moveg(0);
file.seekg(0);
file.position(0);
Kurš no šiem nav failu atvēršanas režīms?
Which of the following is not a file-opening mode?
ios::ate
ios::nocreate
ios::noreplace
ios::truncate
Kura komanda netiek izmantota darbam ar faila rādītāju?
Which of the following is not used to seek a file pointer?
ios::cur
ios::set
ios::end
ios::beg
Kura funkcija tiek izmantota faila rādītāja pārvietošanai?
Which function is used to reposition the file pointer?
moveg()
seekg()
changep()
go_p()
Kura funkcija tiek izmantota C++, lai iegūtu faila rādītāja pašreizējo pozīciju failā?
Which function is used in C++ to get the current position of the file pointer in a file?
getp()
get_pos()
tellp()
tell_pos()
eof() tiek izmantots, lai iegūtu vai pārbaudītu
eof() is used to get
file close
debug report
easy code review
end of file
