GovtExamKit

₹0, ಯಾವಾಗಲೂ · ಸೈನ್-ಅಪ್ ಬೇಕಿಲ್ಲ · ಆಫ್‌ಲೈನ್‌ನಲ್ಲೂ ಕೆಲಸ ಮಾಡುತ್ತದೆ

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:

  1. are constants
  2. must be of type int
  3. share the same memory, so its size is that of the largest member
  4. 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);

  1. 3.2
  2. 2
  3. 3
  4. 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);

  1. 36
  2. 45
  3. 81
  4. 37
ಉತ್ತರ: B. ಪರಿಹಾರ ತೋರಿಸಿ

s = 1 + 2 + … + 9 = 9 × 10 ÷ 2 = 45

Answer: 45

ಪ್ರತಿ ಬಾರಿ ಹೊಸ ಪ್ರಶ್ನೆಗಳಿಗಾಗಿ ಮೇಲಿನ "ಪ್ರಾರಂಭಿಸಿ" ಒತ್ತಿ, ಪ್ರತಿಯೊಂದೂ ಉತ್ತರ ಮತ್ತು ಪೂರ್ಣ ಪರಿಹಾರದೊಂದಿಗೆ.