SlideShare a Scribd company logo
1 of 10
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

More Related Content

What's hot

Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexityAbirami 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 stackMuhammad Nasir
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplicationTaqwa It Center
 
Insert element position
Insert element positionInsert element position
Insert element positionKavya Shree
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math objectallenbailey
 
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 practicesRaphael Meyer
 
Easy practice with current timemillis method
Easy practice with current timemillis methodEasy practice with current timemillis method
Easy practice with current timemillis methodNooria Esmaelzade
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arraysallenbailey
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10alish sha
 
Pa1 wednesday flow_chart
Pa1 wednesday flow_chartPa1 wednesday flow_chart
Pa1 wednesday flow_chartaiclub_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 positionKavya Shree
 

What's hot (19)

Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
 
P3
P3P3
P3
 
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
 
PYTHON PROGRAMS
PYTHON PROGRAMSPYTHON PROGRAMS
PYTHON PROGRAMS
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplication
 
Java -lec-5
Java -lec-5Java -lec-5
Java -lec-5
 
CS 151 homework2a
CS 151 homework2aCS 151 homework2a
CS 151 homework2a
 
Mastering Arrays Assignment
Mastering Arrays AssignmentMastering Arrays Assignment
Mastering Arrays Assignment
 
Insert element position
Insert element positionInsert element position
Insert element position
 
Practical no 4
Practical no 4Practical no 4
Practical no 4
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
 
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
 
C coding#1
C   coding#1C   coding#1
C coding#1
 
Easy practice with current timemillis method
Easy practice with current timemillis methodEasy practice with current timemillis method
Easy practice with current timemillis method
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
 
Pa1 wednesday flow_chart
Pa1 wednesday flow_chartPa1 wednesday flow_chart
Pa1 wednesday flow_chart
 
Adding A Dash In jQuery:
Adding A Dash In jQuery:Adding A Dash In jQuery:
Adding A Dash In jQuery:
 
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
 

Viewers also liked

Über The Team Enablers
Über The Team EnablersÜber The Team Enablers
Über The Team EnablersSarah 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 HayatAqiqah 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-prorrataLeudis 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 enAdri Pombo González
 

Viewers also liked (10)

Über The Team Enablers
Über The Team EnablersÜber The Team Enablers
Über The Team Enablers
 
(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
 
المذكرات
المذكراتالمذكرات
المذكرات
 
Cooperative Learning
Cooperative LearningCooperative Learning
Cooperative Learning
 
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.
 
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
 
Mars7 - Интернет решения
Mars7 - Интернет решенияMars7 - Интернет решения
Mars7 - Интернет решения
 
Ahmad cv 1
Ahmad cv 1Ahmad cv 1
Ahmad cv 1
 
Ahmad Hamdan CV
Ahmad Hamdan CVAhmad Hamdan CV
Ahmad Hamdan CV
 
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
 

Similar to Programming in c

python lab programs.pdf
python lab programs.pdfpython lab programs.pdf
python lab programs.pdfCBJWorld
 
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) assignmentKuntal Bhowmick
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2Kaela Johnson
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17manjurkts
 
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 newLast7693
 
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 newscottbrownnn
 
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 neweyavagal
 
ParallelProgrammingBasics_v2.pdf
ParallelProgrammingBasics_v2.pdfParallelProgrammingBasics_v2.pdf
ParallelProgrammingBasics_v2.pdfChen-Hung Hu
 

Similar to Programming in c (20)

python lab programs.pdf
python lab programs.pdfpython lab programs.pdf
python lab programs.pdf
 
Apclass (2)
Apclass (2)Apclass (2)
Apclass (2)
 
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)
 
CS291(C Programming) assignment
CS291(C Programming) assignmentCS291(C Programming) assignment
CS291(C Programming) assignment
 
Ch7
Ch7Ch7
Ch7
 
Ch7
Ch7Ch7
Ch7
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Cp manual final
Cp manual finalCp manual final
Cp manual final
 
Apclass (2)
Apclass (2)Apclass (2)
Apclass (2)
 
Python Manuel-R2021.pdf
Python Manuel-R2021.pdfPython Manuel-R2021.pdf
Python Manuel-R2021.pdf
 
Apclass
ApclassApclass
Apclass
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
Palm m3 chapter1b
Palm m3 chapter1bPalm m3 chapter1b
Palm m3 chapter1b
 
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
 
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
 
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
 
Chapter 1.ppt
Chapter 1.pptChapter 1.ppt
Chapter 1.ppt
 
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
 
ParallelProgrammingBasics_v2.pdf
ParallelProgrammingBasics_v2.pdfParallelProgrammingBasics_v2.pdf
ParallelProgrammingBasics_v2.pdf
 

More from CS_GDRCST

Java package
Java packageJava package
Java packageCS_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 OSICS_GDRCST
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASECS_GDRCST
 

More from CS_GDRCST (6)

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

Recently uploaded

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Recently uploaded (20)

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

Programming in c

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