ProgrammingModerate
How many multiples of 4 lie between 1 and 100 inclusive?
- A. 25
- B. 24
- C. 26
- D. 100
Correct answer: A. 25
The multiples are 4, 8, ..., 100, which is 100 / 4 = 25 numbers.
More C Programming questions
- What is gcd(84, 36) by the Euclidean algorithm?
- How many divisors does 10 have among 1 through 10?
- int c = 0; for (int i = 0; i < 7; i++) for (int j = 0; j < 7; j++) if (i == j) c++; printf("%d", c); What is printed?
- static int next = 1; int f(void) { return next = 2; } / f is called three times; what does the third call return? /
- struct In { int v; }; struct Out { struct In in; int k; }; struct Out o = {{7}, 2}; printf("%d", o.in.v + o.k); What is printed?
- int p = NULL; if (p && p == 3) puts("match"); else puts("no match"); What is printed?