Using for loop c programmes

Great! Practicing for loops in C is an excellent way to strengthen your understanding of programming logic and structure. Here are 10 C programming exercises using for loops for practice, from beginner to intermediate level: --- ✅ 1. Print Numbers from 1 to N Goal: Input n and print numbers from 1 to n. int n; printf("Enter a number: "); scanf("%d", &n); for (int i = 1; i <= n; i++) {     printf("%d ", i); } --- ✅ 2. Sum of First N Natural Numbers Goal: Input n, output sum 1 + 2 + ... + n. int n, sum = 0; printf("Enter a number: "); scanf("%d", &n); for (int i = 1; i <= n; i++) {     sum += i; } printf("Sum = %d\n", sum); --- ✅ 3. Factorial of a Number Goal: Input n, calculate n!. int n, fact = 1; printf("Enter a number: "); scanf("%d", &n); for (int i = 1; i <= n; i++) {     fact *= i; } printf("Factorial = %d\n", fact); --- ✅ 4. Multiplication Table Goal: Input n, print tabl...

Part-2 :: INPUT & OUTPUT DEVICE Related MCQ



Q.1 Which device use infrared signal to operate or control other device remotely?
A: Remote control
 B: Sensor
 C: Mouse
 D: Touchpad


Answer::  Remote control

 Q.2 Default pointing device of a laptop is –
A: Optical mouse
 B: Sensitive screen
C: Touchpad
D: Tablet pc

 Answer:: Touchpad

Q.3 Which is an example of pointing device?
A: Mouse
 B: Pointer
C: Cursor
 D: HDMI port


 Answer:: Mouse

Q.4 Which among the following is the most common device that accepts letters, numbers and command from a user?
 A: Optical Mouse
 B: Sensitive Screen or touch screen
 C: Keyboard
D: USB

Answer:: Keyboard



 Q.5 What type of keyboard is used in fast food restaurants, offices and shops?
A: Numeric keypads
B: Numeric Keyboard
 C: Concept keyboard
D: Concise keyboard

Answer:: Concept keyboard

Q.6 What type of keyboard is used in telephone and ATMs?
A: Numeric keyboard
B: Numeric keypad
C: Folding keyboard
D: Any type of keyboard

Answer:: Numeric keyboard

 Q.7 Which input device is used to read magnetic stripes?
 A: Stripe reader
B: Bar code reader
 C: Magnetic stripe reader
 D: All the above

Answer:: Magnetic stripe reader

 8. Which device containing sensors send signals to computer whenever light changes are detected?
A: Light pen
 B: Reflectors

 C: Deflector
 D: All the above

Answer:: Light pen

  9. Which is used with stylus to produce freehand drawings?
 A: Drawing pen
B: Reflector
 C: Graphic tablets
 D: Light pen

Answer:: Graphic tablets

10. Among which of the following computer input device enable video conference?
A: Microphone
B: Digital Camera
C: Voice recognition
D: Webcam

Answer:: Webcam

11. Which input device allow only voice communication?
A: Microphone
B: Webcam
C: Voice recognition
 D: All of Above

 Answer:: Microphone

12. Which system can read special characters printed in special ink?
 A: Optical Scanner
 B: Magnetic Ink character recognition or MICR
C: QCR
 D: OPR

Answer:: MICR

13. Which computer application scans text and converts into readable form in computer?
 A: Optical Scanner Reader
B: Optical Marker Recognition
 C: Optical character Recognition
 D: Optical character evaluator

Answer:: Optical character recognition

14. What is output device?
 A: It allows data to be output from a computer
B; It allows to print data
 C: It allow to store data
 D: It allow to read internal data for processing
Which option(s) is/are correct?

 Answer Option A and B both correct.

15. A control device is –
 A: it control the computer.
B: It control the printout.
C: It is another type of output devices.

 Which option is correct?
 Answer:: It is another type of output device.

16. Which output device of a computer is used for training presentations?
A: Plotters
B: Multimedia projectors
C: Computer monitor
 D: Inject or laser printer

 Answer:: Multimedia projectors

 17. Which is used to output sound from multimedia presentations?
A: External Speaker
B: Keynoter
 C: Announcer
D: Elocutionists

Answer:: External Speaker

18. Which output device of a computer used for producing highly accurate, very large drawings and poster?
A: Plotter
 B: dot matrix printer
 C: Inkjet printers
 D: Laser printers

Answer:: Plotter

19. Which is a kind of impact printers?
 A: Plotter
 B: Dot matrix printer
 C: Laser printer
D: Inkjet printer

Answer:: Dot matrix printer

20. Which produce good quality of hard copies?
 A Plotter
B: Dot matrix printer
 C: Laser printer
 D: Inkjet printer

Answer:: Inkjet printer

21. Which is the least expensive type of monitor?
A: CRT monitors
B: TFT monitors
C: LED monitor
D: LCD monitor

 Answer:: CRT monitor.

Comments

Popular posts from this blog

python in brief

advance loop based C programmes