C Programming
Data types and format specifiers, operators and precedence, increment, loops, arrays and strings, pointers, functions, storage classes, structures and unions.
Learn: notes, formulas, solved examples and question book
ഉദാഹരണ ചോദ്യങ്ങളും വിശദീകരണവും
ചോദ്യങ്ങൾ ഇപ്പോൾ ഇംഗ്ലീഷിലും ഹിന്ദിയിലും മാത്രം. ആപ്പിന്റെ ബാക്കി ഭാഗം നിങ്ങളുടെ ഭാഷയിലാണ്.
1. In a C union, all members:
- are constants
- must be of type int
- share the same memory, so its size is that of the largest member
- get separate memory
ഉത്തരം: C. വിശദീകരണം കാണുക
Answer: share the same memory, so its size is that of the largest member
A structure gives each member its own space (size at least the sum); a union overlays them.
Source: NIELIT O-Level syllabus (networks, C programming, DBMS) and standard computer science textbook - textbook fact
2. What does this C code print? int a = 29, b = 9; printf("%d", a / b);
- 3.2
- 2
- 3
- 4
ഉത്തരം: C. വിശദീകരണം കാണുക
Integer division drops the fraction: 29 / 9 = 3
Answer: 3
3. What does this C code print? int i, s = 0; for (i = 1; i <= 9; i++) s += i; printf("%d", s);
- 36
- 45
- 81
- 37
ഉത്തരം: B. വിശദീകരണം കാണുക
s = 1 + 2 + … + 9 = 9 × 10 ÷ 2 = 45
Answer: 45
ഓരോ തവണയും പുതിയ ചോദ്യങ്ങൾക്ക് മുകളിലെ "തുടങ്ങുക" അമർത്തുക, ഓരോന്നിനും ഉത്തരവും പൂർണ്ണ വിശദീകരണവും ഉണ്ട്.