Главная /
Программирование на языке C в Microsoft Visual Studio 2010 /
Какой файл будет получен в результате выполнения приведенной программы? #include <stdio.h> int main( void ) { FILE *stream; char list[30]; int i, numread, numwritten; if( (stream = fopen("g:\\fread.out", "w+t")) != NULL ) { for ( i = 0; i < 26; i
Какой файл будет получен в результате выполнения приведенной программы?
#include <stdio.h>
int main( void )
{
FILE *stream;
char list[30];
int i, numread, numwritten;
if( (stream = fopen("g:\\fread.out", "w+t")) != NULL )
{
for ( i = 0; i < 26; i++ )
list[i] = (char)('z' - i);
numwritten = fwrite( list, sizeof( char ), 26, stream );
printf( "Wrote %d items\n", numwritten );
fclose( stream );
}
else
printf( "Problem opening the file\n" );
if( (stream = fopen("g:\\fread.out", "r+t" )) != NULL )
{
numread = fread( list, sizeof( char ), 26, stream );
printf( "Number of items read = %d\n", numread );
printf( "Contents of buffer = %.26s\n", list );
fclose( stream );
}
else
printf( "File could not be opened\n" );
}
вопрос
Правильный ответ:
Сложность вопроса
49
Сложность курса: Программирование на языке C в Microsoft Visual Studio 2010
62
Оценить вопрос
Комментарии:
Аноним
Кто гуглит эти ответы inuit? Это же очень простые ответы
06 сен 2020
Другие ответы на вопросы из темы программирование интуит.
- # Какое сообщение будет выведено на экран в результате выполненния приведенной программы? int main (void) { struct student { char *name; char *birthday; int group; } s1, s2; int s; s1.name = "Ivanov"; s1.birthday = "10.03.1985"; s1.group = 1014; s2.name = "Petrov"; s2.birthday = "08.04.1985"; s2.group = 1309; s2.group = s1.group; if (s2.group == s1.group) printf("Students %s and %s are studying in the same group\n", s1.name, s2.name); else printf("Students %s and %s are not studying in the same group\n", s1.name, s2.name); return 0; }
- # Какое утверждение является верным?
- # Чему будет равно значение переменной s после выполнения приведенного фрагмента кода? int test(); int a = 1; int main (void) { int b, s; extern int x; static int c; int a; a = 2; s = test(); return 0; } int test() { int t = a; return t; }
- # Что такое указатель?
- # Какие утверждения о размере динамически распределяемой области памяти являются верными?