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

Programming in c

  • 2.
    Scheme of Examination SampleQuestion 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 programto 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 positiveno. : 5 Factorial of 5 is 120