SlideShare a Scribd company logo
Programming in c
Scheme of Examination
Sample Question Paper
Sample Solution with :
Algorithm
Flowchat
Source Code
Output
Max. Marks : 100 Duration : 3 Hours
Marks Distribution
Program 1 - 20 Marks
Program 2 - 20 Marks
Program 3 - 20 Marks
Viva - 25 Marks
[Pra.Copy + IR] – 15 Marks
Total - 100 Marks
Set : A
Note : (i)Attempt any 3 Questions.
(ii) All program with flowchart & algorithms.
Qu. 1: Write a program to print the following:
A
A B
A B C
Qu. 2: Write a program to find the factorial of a given number.
Qu. 3: Write a program to use putw() & getw() in file
handling.
Qu. 4: Write a program of Command Line Argument.
Set : A
Qu. 2: Write a program to find the factorial of a given number.
Algorithm : To find factorial of a number.
Step 1: [Take input for variable num]
num=value
Step 2 : [Initialization]
fact = 1, i = num
Step 3 : Repeat step 3 while (i>=1)
i) fact = fact*I
ii) i = i-1
Step 4 : [Display the value of fact]
Print “Factorial is : ” fact
Step 5 : Exit
START
Take Input for
num
Initialize
fact = 1
i = num
i>=1
fact = fact * i
i=i-1
Print “Factorial
is ” fact
STOP
False
True
// A program to find the factorial of a number. Documentation Section
#include<stdio.h> // Header files ….. Link Section
#include<conio.h>
void main() // main function section
{
int num,i,fact=1; // variable declaration & initialization
clrscr(); // clear screen
printf(“Enter any positive no. : ”);
scanf(“%d”,&num);
i = num; //Logic to get factorial no. starts from here
while(I >= 1)
{
fact = fact * i;
i--;
} // Logic ends here
printf(“Factorial of %d is %d”,num,fact);
getch();
}
Enter any positive no. : 5
Factorial of 5 is 120
Programming in c
Programming in c
Ad

More Related Content

What's hot (19)

Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
Abirami A
 
P3
P3P3
P3
lksoo
 
electic mashinary fundamentals 5th edition Lab tasks stack
electic mashinary fundamentals 5th edition Lab tasks stackelectic mashinary fundamentals 5th edition Lab tasks stack
electic mashinary fundamentals 5th edition Lab tasks stack
Muhammad Nasir
 
PYTHON PROGRAMS
PYTHON PROGRAMSPYTHON PROGRAMS
PYTHON PROGRAMS
Alvino rock
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplication
Taqwa It Center
 
Java -lec-5
Java -lec-5Java -lec-5
Java -lec-5
Zubair Khalid
 
CS 151 homework2a
CS 151 homework2aCS 151 homework2a
CS 151 homework2a
Rudy Martinez
 
Mastering Arrays Assignment
Mastering Arrays AssignmentMastering Arrays Assignment
Mastering Arrays Assignment
Kasun Ranga Wijeweera
 
Insert element position
Insert element positionInsert element position
Insert element position
Kavya Shree
 
Practical no 4
Practical no 4Practical no 4
Practical no 4
Kshitija Dalvi
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
allenbailey
 
A story about my journey in the land of programming practices
A story about my journey in the land of programming practicesA story about my journey in the land of programming practices
A story about my journey in the land of programming practices
Raphael Meyer
 
C coding#1
C   coding#1C   coding#1
C coding#1
Sekhar Pisini
 
Easy practice with current timemillis method
Easy practice with current timemillis methodEasy practice with current timemillis method
Easy practice with current timemillis method
Nooria Esmaelzade
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
allenbailey
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
alish sha
 
Pa1 wednesday flow_chart
Pa1 wednesday flow_chartPa1 wednesday flow_chart
Pa1 wednesday flow_chart
aiclub_slides
 
Adding A Dash In jQuery:
Adding A Dash In jQuery:Adding A Dash In jQuery:
Adding A Dash In jQuery:
Reema
 
Deletion of an element at a given particular position
Deletion of an  element  at a given particular positionDeletion of an  element  at a given particular position
Deletion of an element at a given particular position
Kavya Shree
 
Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
Abirami A
 
electic mashinary fundamentals 5th edition Lab tasks stack
electic mashinary fundamentals 5th edition Lab tasks stackelectic mashinary fundamentals 5th edition Lab tasks stack
electic mashinary fundamentals 5th edition Lab tasks stack
Muhammad Nasir
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplication
Taqwa It Center
 
Insert element position
Insert element positionInsert element position
Insert element position
Kavya Shree
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
allenbailey
 
A story about my journey in the land of programming practices
A story about my journey in the land of programming practicesA story about my journey in the land of programming practices
A story about my journey in the land of programming practices
Raphael Meyer
 
Easy practice with current timemillis method
Easy practice with current timemillis methodEasy practice with current timemillis method
Easy practice with current timemillis method
Nooria Esmaelzade
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
allenbailey
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
alish sha
 
Pa1 wednesday flow_chart
Pa1 wednesday flow_chartPa1 wednesday flow_chart
Pa1 wednesday flow_chart
aiclub_slides
 
Adding A Dash In jQuery:
Adding A Dash In jQuery:Adding A Dash In jQuery:
Adding A Dash In jQuery:
Reema
 
Deletion of an element at a given particular position
Deletion of an  element  at a given particular positionDeletion of an  element  at a given particular position
Deletion of an element at a given particular position
Kavya Shree
 

Viewers also liked (10)

Über The Team Enablers
Über The Team EnablersÜber The Team Enablers
Über The Team Enablers
Sarah Hoeter
 
(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat
(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat
(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat
Aqiqah Medan Nurul Hayat
 
المذكرات
المذكراتالمذكرات
المذكرات
muaz mustafa
 
Cooperative Learning
Cooperative LearningCooperative Learning
Cooperative Learning
Jolieto Cambalo Caparida
 
Werk is Waar u bent. Een White Paper von Leitz.
Werk is Waar u bent. Een White Paper von Leitz.Werk is Waar u bent. Een White Paper von Leitz.
Werk is Waar u bent. Een White Paper von Leitz.
Staples Advantage Europe
 
Los procedimientos-de-distribución-y-distribución-a-prorrata
Los procedimientos-de-distribución-y-distribución-a-prorrataLos procedimientos-de-distribución-y-distribución-a-prorrata
Los procedimientos-de-distribución-y-distribución-a-prorrata
Leudis Castillo González
 
Mars7 - Интернет решения
Mars7 - Интернет решенияMars7 - Интернет решения
Mars7 - Интернет решения
Mars7
 
Ahmad cv 1
Ahmad cv 1Ahmad cv 1
Ahmad cv 1
Ahmad Alulaimi
 
Ahmad Hamdan CV
Ahmad Hamdan CVAhmad Hamdan CV
Ahmad Hamdan CV
Ahmad Hamdan
 
Valoración de la planificación y del trabajo en
Valoración de la planificación y del trabajo enValoración de la planificación y del trabajo en
Valoración de la planificación y del trabajo en
Adri Pombo González
 
Über The Team Enablers
Über The Team EnablersÜber The Team Enablers
Über The Team Enablers
Sarah Hoeter
 
(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat
(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat
(061) 822 8592 / 0822 7499 9994 Aqiqah Medan Nurul Hayat
Aqiqah Medan Nurul Hayat
 
Werk is Waar u bent. Een White Paper von Leitz.
Werk is Waar u bent. Een White Paper von Leitz.Werk is Waar u bent. Een White Paper von Leitz.
Werk is Waar u bent. Een White Paper von Leitz.
Staples Advantage Europe
 
Los procedimientos-de-distribución-y-distribución-a-prorrata
Los procedimientos-de-distribución-y-distribución-a-prorrataLos procedimientos-de-distribución-y-distribución-a-prorrata
Los procedimientos-de-distribución-y-distribución-a-prorrata
Leudis Castillo González
 
Mars7 - Интернет решения
Mars7 - Интернет решенияMars7 - Интернет решения
Mars7 - Интернет решения
Mars7
 
Valoración de la planificación y del trabajo en
Valoración de la planificación y del trabajo enValoración de la planificación y del trabajo en
Valoración de la planificación y del trabajo en
Adri Pombo González
 
Ad

Similar to Programming in c (20)

python lab programs.pdf
python lab programs.pdfpython lab programs.pdf
python lab programs.pdf
CBJWorld
 
Apclass (2)
Apclass (2)Apclass (2)
Apclass (2)
geishaannealagos
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Make Mannan
 
CS291(C Programming) assignment
CS291(C Programming) assignmentCS291(C Programming) assignment
CS291(C Programming) assignment
Kuntal Bhowmick
 
Ch7
Ch7Ch7
Ch7
sanya6900
 
Ch7
Ch7Ch7
Ch7
Ramesh Ankathi
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
Kaela Johnson
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
shyamuopeight
 
Cp manual final
Cp manual finalCp manual final
Cp manual final
itprasad1237
 
Computer P-Lab-Manual acc to syllabus.pdf
Computer P-Lab-Manual acc to syllabus.pdfComputer P-Lab-Manual acc to syllabus.pdf
Computer P-Lab-Manual acc to syllabus.pdf
sujathachoudaryn29
 
Apclass (2)
Apclass (2)Apclass (2)
Apclass (2)
geishaannealagos
 
Python Manuel-R2021.pdf
Python Manuel-R2021.pdfPython Manuel-R2021.pdf
Python Manuel-R2021.pdf
RamprakashSingaravel1
 
Apclass
ApclassApclass
Apclass
geishaannealagos
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
manjurkts
 
Palm m3 chapter1b
Palm m3 chapter1bPalm m3 chapter1b
Palm m3 chapter1b
Juan Pablo Fuentes Encinas
 
L3. Operators in JS, CSE 202, BN11.pdf JavaScript
L3. Operators in JS, CSE 202, BN11.pdf JavaScriptL3. Operators in JS, CSE 202, BN11.pdf JavaScript
L3. Operators in JS, CSE 202, BN11.pdf JavaScript
SauravBarua11
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
manjurkts
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
scottbrownnn
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
Last7693
 
Chapter 1.ppt
Chapter 1.pptChapter 1.ppt
Chapter 1.ppt
Indra Hermawan
 
python lab programs.pdf
python lab programs.pdfpython lab programs.pdf
python lab programs.pdf
CBJWorld
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Make Mannan
 
CS291(C Programming) assignment
CS291(C Programming) assignmentCS291(C Programming) assignment
CS291(C Programming) assignment
Kuntal Bhowmick
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
Kaela Johnson
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
shyamuopeight
 
Computer P-Lab-Manual acc to syllabus.pdf
Computer P-Lab-Manual acc to syllabus.pdfComputer P-Lab-Manual acc to syllabus.pdf
Computer P-Lab-Manual acc to syllabus.pdf
sujathachoudaryn29
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
manjurkts
 
L3. Operators in JS, CSE 202, BN11.pdf JavaScript
L3. Operators in JS, CSE 202, BN11.pdf JavaScriptL3. Operators in JS, CSE 202, BN11.pdf JavaScript
L3. Operators in JS, CSE 202, BN11.pdf JavaScript
SauravBarua11
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
manjurkts
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
scottbrownnn
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
Last7693
 
Ad

More from CS_GDRCST (6)

Java package
Java packageJava package
Java package
CS_GDRCST
 
Exam tips
Exam tipsExam tips
Exam tips
CS_GDRCST
 
Ds new
Ds newDs new
Ds new
CS_GDRCST
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Computer Networks basics and OSI
Computer Networks basics and OSIComputer Networks basics and OSI
Computer Networks basics and OSI
CS_GDRCST
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
CS_GDRCST
 
Java package
Java packageJava package
Java package
CS_GDRCST
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Computer Networks basics and OSI
Computer Networks basics and OSIComputer Networks basics and OSI
Computer Networks basics and OSI
CS_GDRCST
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
CS_GDRCST
 

Recently uploaded (20)

CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 

Programming in c

  • 2. Scheme of Examination Sample Question Paper Sample Solution with : Algorithm Flowchat Source Code Output
  • 3. Max. Marks : 100 Duration : 3 Hours Marks Distribution Program 1 - 20 Marks Program 2 - 20 Marks Program 3 - 20 Marks Viva - 25 Marks [Pra.Copy + IR] – 15 Marks Total - 100 Marks
  • 4. Set : A Note : (i)Attempt any 3 Questions. (ii) All program with flowchart & algorithms. Qu. 1: Write a program to print the following: A A B A B C Qu. 2: Write a program to find the factorial of a given number. Qu. 3: Write a program to use putw() & getw() in file handling. Qu. 4: Write a program of Command Line Argument.
  • 5. Set : A Qu. 2: Write a program to find the factorial of a given number. Algorithm : To find factorial of a number. Step 1: [Take input for variable num] num=value Step 2 : [Initialization] fact = 1, i = num Step 3 : Repeat step 3 while (i>=1) i) fact = fact*I ii) i = i-1 Step 4 : [Display the value of fact] Print “Factorial is : ” fact Step 5 : Exit
  • 6. START Take Input for num Initialize fact = 1 i = num i>=1 fact = fact * i i=i-1 Print “Factorial is ” fact STOP False True
  • 7. // A program to find the factorial of a number. Documentation Section #include<stdio.h> // Header files ….. Link Section #include<conio.h> void main() // main function section { int num,i,fact=1; // variable declaration & initialization clrscr(); // clear screen printf(“Enter any positive no. : ”); scanf(“%d”,&num); i = num; //Logic to get factorial no. starts from here while(I >= 1) { fact = fact * i; i--; } // Logic ends here printf(“Factorial of %d is %d”,num,fact); getch(); }
  • 8. Enter any positive no. : 5 Factorial of 5 is 120