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

ICT WRITTEN EXAM 2020:: TODAYS TOPIC:: HTML

//WRITE A HTML PROGRAM TO DISPLAY YOUR WEB BROWSER "HELLO WORLD" AND LINKING WITH ANOTHER WEB PAGE WELCOME TO MY WEBSITE//

SOLUTION 1

<HTML>
<HEAD><h1>MY</h1> </HEAD>
<BODY>
<A href="my2.html">HELLO WORLD </a>
</BODY>

</HTML>
SOLUTION 2
<html>

<body>
welcome to my website
</body>
</html>
M.C.Q

(1) HTML is stand for

[A] Hyper Text Markup Language

[B] Holistic Technical Method Library

[C] Hyper Tax Makes Line

[D] None of the above

Answer: Option [A]

(2) HTML is a subset of

[A] SGMD

[B] SGML

[C] SGMH

[D] None of the above

Answer: Option [B]

(3) ALL HTML tags are enclosed in what ?

[A] # and #

[B] ? and !

[C] < and >

[D] { and }

Answer: Option [C]

(4) To create HTML page, you need

[A] Web browser

[B] text editor

[C] Both [A] and [B]

[D] None of the above

Answer: Option [C]

(5) <a> and </a> are the tags used for

[A] Adding image

[B] Aligning text

[C] Audio-voiced text

[D] Adding links to your page

Answer :: D

6.The BODY tag is usually used after

[A] HTML tag

[B] EM tag

[C] TITLE tag

[D] HEAD tag

Answer: Option [D]

7.Choose the correct HTML tag to make a text bold

[A] <bd>

[B] <bold>

[C] <bl>

[D] <b>

Ans:: D

8.Which tag adds a paragraph break after the text ?

[A] <BR>

[B] <P>

[C] <PARAGRAPH>

[D] <HR>
Ans ::- B

Comments

Popular posts from this blog

python in brief

advance loop based C programmes