Gate 2008 pyq C Programming | Choose the correct option to fill ?1 and ?2 so that the program below
Автор: Gate CS pyqs - the other way[Hin]
Загружено: 2022-11-22
Просмотров: 506
Описание:
Choose the correct option to fill ?1 and ?2 so that the program below prints an input string in reverse order. Assume that the input string is terminated by a newline character.
void reverse(void)
{
int c;
if (?1) reverse();
?2
}
int main()
{
printf ("Enter Text ") ;
printf ("\n") ;
reverse();
printf ("\n") ;
}
(A) ?1 is (getchar() != ’\n’)
?2 is getchar(c);
(B) ?1 is (c = getchar() ) != ’\n’)
?2 is getchar(c);
(C) ?1 is (c != ’\n’)
?2 is putchar(c);
(D) ?1 is ((c = getchar()) != ’\n’)
?2 is putchar(c);
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: