logo

Crowdly

Browser

Додати до Chrome

Coding Café

Шукаєте відповіді та рішення тестів для Coding Café ? Перегляньте нашу велику колекцію перевірених відповідей для Coding Café в dle.plaksha.edu.in.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

We hope you enjoyed taking this test. Please share your experience, if you wish to. 😊

Переглянути це питання

Attempt either (A) or (B). Write down clearly in your answer which one you are attempting.

A.
In the following piece of code intended to receive user input character by character, and display it on the screen, the programmer did not pay attention to a subtle detail, due to which the program does not work as expected (even though it does not throw any compilation errors):

while (ch = getchar() != EOF)

  putchar(ch);

Can you help the programmer fix the bug by rewriting the code? Explain briefly.

(OR) 
B.

The following code segment written by a beginner in C does not work as expected. However, there is no compilation error. Can you spot the bug and rewrite the piece of code so it is bug-free? Explain briefly why the bug arose.

int

x = 5;

if (x = 0)

    printf("Zero\n");

else

    printf("Non-zero\n

");

Переглянути це питання
Within a sentence, state what the above program does.

Переглянути це питання
In class, we discussed several ways of writing an improved version of the program for CGPA calculation. Mention any one way that would greatly minimise any data input inconsistencies from the user end, and would make the program generic enough to calculate the CGPA of any university.
Переглянути це питання

The memory location where the last element of a five-element array is stored can be obtained by using &arr[5].

0%
0%
Переглянути це питання

Typing what on the keyboard signals

EOF (end of file) when a C program is taking data from the user?

0%
0%
0%
0%
Переглянути це питання

The user-defined function used by the program takes a float number as an argument and returns nothing.

0%
0%
Переглянути це питання

Consider the piece of code:

for (i = 1, sum = 0; i <= 5; i++) 

sum += i * i;

Which of the following statements is true?

0%
0%
0%
0%
0%
Переглянути це питання

A line such as #define MAX 4 that appears in a C program is:

0%
0%
0%
0%
Переглянути це питання
Select all correct statements concerning arrays in C:

0%
0%
0%
0%
0%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на dle.plaksha.edu.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome