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...

Basic General Knowledge M.C.Q

1. Who is the first non-indian to receive the 
Bharat Ratna? 

A. Martin Luther King 
B. Mother Terasa 
C. Khan Abdul Ghaffar Khan 
D. Aubin Mehta 

Ans. Khan Abdul Ghaffar Khan 

2. When did Mother Teresa win the Nobel 
Peace Prize? 

A. 1975 
B. 1979 
C. 1981 
D. 1982

Ans. B. 1979

3. Which one of the following glasses is used in 
bullet proof screens? 

A. Soda glass 
B. Pyrex glasss 
C. Jena glass 
D. Reinforced glass

Ans. D. Reinforced glass

4. Which substance is used to retard the 
setting action of cement? 

A. CaO 
B. AlO 
C. CaSO4,2H2O 
D. NaO + KO 

Ans. C. CaSO4,2H2O 

5. The mineral in which India depends largely 
on imports is 

A. Iron Ore 
B. Bauxite 
C. Mica 
D. Mercury

Ans. D. Mercury

6. The last Mughal Emperor was

A. Akbar 
B. Bahadur Shah 
C. NoorJehan 
D. Babur 

B. Bahadur Shah

7. The longest mountain range in the world is 

A. The Alps 
B. The Himalayas 
C. The Andes 
D. The Rockies

Ans.C. The Andes  

8. The most populous city in the world is 

A. Paris 
B. London 
C. Peking 
D. Tokyo

Ans. A. Paris 

9. Which state produces maximum soyabean 

A. Madhya Pradesh 
B. Uttar Pradesh 
C. Bihar 
D. Rajasthan 

Ans.A. Madhya Pradesh

10. Which one among the following radiations 
carries maximum energy? 

A. Ultraviolet rays 
B. Gamma rays 
C. X- rays 
D. Infra red rays 

Ans.B. Gamma rays 

11. Bokaro Steel Limited was established with 
the assistance of 

A. Germany 
B. Soviet Union 
C. UK 
D. USA 

Ans.B. Soviet Union

12. The head quarters of world trade 
organisation is in 

A. montreal 
B. seatle 
C. geneva 
D. the hague

Ans.C. geneva

13. The 2014 football world cup is scheduled to 
be held in 

A. China 
B. Australia 
C. Japan 
D. Brazil 

Ans. D. Brazil 

14. The Second Italian Satellite launched from 
Soviet Union was 


A. Rohini 
B. Aryabhatta 
C. Bhaskara–1 
D. Apsara 

Ans. C. Bhaskara–1 

15. The metal whose salts are sensitive to light 
is::


A. Silver 
B. Zinc 
C. Copper 
D. Gold 

Ans.A. Silver 

16. The instrument useful for measuring 
curvature of surface is 

A. Odometer 
B. Spherometer 
C. Tachometer 
D. Speedometer

18. The brain fever which affects young 
children is 
A. Malaria 
B. Typhoid 
C. Encephatitis 
D. Pneumonia 
19. Which of the following cash crops is not 
grown in Kerala? 
A. Spices 
B. Tobacco 
C. Rubber 
D. Coffee

Comments

Popular posts from this blog

python in brief

advance loop based C programmes