Looking for Coding Café test answers and solutions? Browse our comprehensive collection of verified answers for Coding Café at dle.plaksha.edu.in.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Which of the following function declarations (also called as "function prototypes") are valid?
#include <stdio.h>int main() { int i = 0; while (i < 5) { if (i % 2 == 0) { putchar('*'); continue; } printf("%d ", i); i++; } return 0;}
Function calls that return void may not be used as a part of an expression.
void func(int x, int y){ int z; scanf("%d", &z); return z;}
How many times does the while loop run?
#include <stdio.h>int main(){ int i = 1; while (i <= 5) printf("%d ", i++); putchar('\n'); return 0;}
The principles of top–down design and structured programming dictate that a program should be divided into a main module and its related modules.
Which of these statements is/are true?
What is the output of the following program that compiles correctly? (Hint: When evaluating logical operators, the compiler ignores the remainder of the expression when it is sure of the final answer at any point of evaluation of the sub-expression - something often referred to as "short-circuit evaluation". This is a cryptic hint, I know, but enjoy unravelling it and discovering its meaning and implication!)
#include <stdio.h>int main(){ int a= -2, b= -1, c = 0, d = 1, e = 2; int r1, r2; r2 = a++ || ++b || c++ || ++d || e; r1 = a && b++ && ++c && d++ && ++e; printf("%d %d %d\n", r1,r2,a+b+c+d+e); return 0;}