Probability Engine · CSC115

C Programming (BSc CSIT, CSC115): the questions likely to come

75 analyzed questions from 7 past papers (2074-2081), grouped by syllabus unit — each with its probability, how often it's been asked, and where to study the answer.

7
Papers analyzed
2074-2081
75
Analyzed questions
across 10 syllabus units
6
Very likely units
high-probability topics
7
Units = 80% of marks
study these first
Model answers for this subject are being written. Every question links to its original paper so you can study from the source meanwhile.
Pick a unit
U5 · Q1/13 · 207910 marks
Control Statements

Explain the different types of looping statements with syntax and example. Write a program to check whether a number is an Armstrong number.

16%
Occasional to appearAppeared in 1 of the last 1 board papers
Seen in
How well do you know this?rating moves you on
MODEL ANSWERU5 · 10 marks

Looping Statements in C

A loop repeatedly executes a block of statements as long as a condition remains true. C provides three loop constructs.

1. while loop (entry-controlled)

The condition is tested before the body executes; body may run zero times.

while (condition) {
    // body
}
int i = 1;
while (i <= 5) { printf("%d ", i); i++; }   // 1 2 3 4 5

2. do...while loop (exit-controlled)

The body executes once first, then the condition is tested; body runs at least once.

do {
    // body
} while (condition);
int i = 1;
do { printf("%d ", i); i++; } while (i <= 5);  // 1 2 3 4 5

3. for loop (entry-controlled, compact)

Initialization, condition and update are written in one line.

for (init; condition; update) {
    // body
}
for (int i = 1; i <= 5; i++) printf("%d ", i);  // 1 2 3 4 5

Key difference: while and for test the condition first (may run 0 times); do...while runs at least once.

Program: Check Armstrong Number

An Armstrong number equals the sum of its own digits each raised to the power of the number of digits (e.g. 153=13+53+33153 = 1^3 + 5^3 + 3^3).

#include <stdio.h>
#include <math.h>

int main() {
    int num, temp, rem, sum = 0, digits = 0;
    printf("Enter a number: ");
    scanf("%d", &num);

    temp = num;
    while (temp != 0) { digits++; temp /= 10; }   // count digits

    temp = num;
    while (temp != 0) {
        rem = temp % 10;
        sum += (int)pow(rem, digits);
        temp /= 10;
    }

    if (sum == num)
        printf("%d is an Armstrong number\n", num);
    else
        printf("%d is not an Armstrong number\n", num);
    return 0;
}

Sample run: input 153 → output 153 is an Armstrong number.

AI-generated answer · unverifiedView in 2079 paper →
U5 · Question 1 of 13
Question Priority · U5ranked by appearance likelihood — study top-down

Control Statements

Analyzed next29%
1
★ TOP PICK

Explain the different types of looping statements with syntax and example. Write a program to check whether a number is an Armstrong number.

10 marksSEEN IN
16%
2

Write a program to display the first 50 prime numbers.

5 marksSEEN IN
29%
3

Differentiate between while and do-while loops.

5 marksSEEN IN
26%
4

Explain different types of decision-making (branching) statements in C with syntax and examples. Differentiate if-else with switch statement.

10 marksSEEN IN
11%
5

What is a loop? Explain different types of looping statements available in C with syntax, flowchart and examples.

10 marksSEEN IN
10%
6

Explain the switch-case statement with an example.

5 marksSEEN IN
18%
7

Write a program to reverse a given number.

5 marksSEEN IN
16%
8

Explain the use of the goto statement with an example.

5 marksSEEN IN
15%
9

What is a nested loop? Write a program to print a pyramid pattern of stars.

5 marksSEEN IN
15%
10

Write a program to find the sum of digits of a given number.

5 marksSEEN IN
15%
11

Write a program to display the Fibonacci series up to n terms.

5 marksSEEN IN
11%
12

Differentiate between break and continue statements with examples.

5 marksSEEN IN
10%
13

Write a program to check whether a given number is prime or not.

5 marksSEEN IN
10%
03The mock

Sit a probable paper

A full mock exam built from the most likely questions, mirroring the real paper's structure. Every slot is a real past question.

Most Probable Paper

Mirrors the real structure · 60 marks · based on 7 past papers

Section A: Long Answer QuestionsAttempt any TWO questions.
  1. 1.

    List different types of operators available in C and explain any four of them with examples.

    [10 marks]
    Operators and ExpressionsVery likelyfrom 2077 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Operators and Expressions) appears in 86% of years.

  2. 2.

    Explain the different types of looping statements with syntax and example. Write a program to check whether a number is an Armstrong number.

    [10 marks]
    Control StatementsVery likelyfrom 2079 paper →

    Asked once (2079); so far only in internal assessments, not the board; and its topic (Control Statements) appears in 100% of years.

  3. 3.

    Explain different types of decision-making (branching) statements in C with syntax and examples. Differentiate if-else with switch statement.

    [10 marks]
    Control StatementsVery likelyfrom 2075 paper →

    Asked once (2075); so far only in internal assessments, not the board; and its topic (Control Statements) appears in 100% of years.

Section B: Short Answer QuestionsAttempt any EIGHT questions.
  1. 1.

    Describe different formatted input and output functions in C.

    [5 marks]
    Input and OutputLikelyfrom 2081 paper →

    This question has recurred in 3 of 7 years; so far only in internal assessments, not the board; and its topic recurs in 5 of 7 years.

  2. 2.

    Write a program to display the first 50 prime numbers.

    [5 marks]
    Control StatementsVery likelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Control Statements) appears in 100% of years.

  3. 3.

    Differentiate between while and do-while loops.

    [5 marks]
    Control StatementsVery likelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Control Statements) appears in 100% of years.

  4. 4.

    Demonstrate the use of a recursive function with a suitable example.

    [5 marks]
    FunctionsVery likelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Functions) appears in 100% of years.

  5. 5.

    Explain the use of pointers with arrays.

    [5 marks]
    PointersLikelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic recurs in 5 of 7 years.

  6. 6.

    Explain the basic structure of a C program.

    [5 marks]
    IntroductionVery likelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Introduction) appears in 86% of years.

  7. 7.

    Write short notes on storage classes in C.

    [5 marks]
    Elements of CLikelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic recurs in 5 of 7 years.

  8. 8.

    Explain the switch-case statement with an example.

    [5 marks]
    Control StatementsVery likelyfrom 2080 paper →

    Asked once (2080); so far only in internal assessments, not the board; and its topic (Control Statements) appears in 100% of years.

  9. 9.

    Write a program to reverse a given number.

    [5 marks]
    Control StatementsVery likelyfrom 2079 paper →

    Asked once (2079); so far only in internal assessments, not the board; and its topic (Control Statements) appears in 100% of years.

04The receipts

Behind the numbers

The raw evidence the predictions are computed from: marks per unit per year, syllabus weights, trends, and coverage.

Show the heatmap, topic table and coverage analysis

The receipt: marks per unit, per year

Each row is a syllabus unit, each column an exam year, each cell the marks that unit earned that year. Click any cell to see the actual questions behind it.

Marks:nonefew → many
2074
2075
2077
2078
2079
2080
2081
Total
U5Control Statements
90
U6Arrays and Strings
85
U7Functions
75
U4Operators and Expressions
60
U9Structure and Union
45
U8Pointers
45
U1Introduction
35
U2Elements of C
40
U3Input and Output
25
U10File Handling
25
#Syllabus unitProbabilityAppearedAvg marksSyllabus weightExam vs syllabusTrendQuestions
1U5Control StatementsVery likely100%12.916%7 lecture hrsBalancedexam 17% · syllabus 16%Fading2 recurring13 total
2U6Arrays and StringsVery likely100%12.113%6 lecture hrsBalancedexam 16% · syllabus 13%Steadynone repeat13 total
3U7FunctionsVery likely100%10.713%6 lecture hrsBalancedexam 14% · syllabus 13%Steady1 recurring11 total
4U4Operators and ExpressionsVery likely86%1011%5 lecture hrsBalancedexam 11% · syllabus 11%Rising1 recurring7 total
5U9Structure and UnionVery likely86%7.59%4 lecture hrsBalancedexam 9% · syllabus 9%Risingnone repeat7 total
6U8PointersLikely71%99%4 lecture hrsBalancedexam 9% · syllabus 9%Steady1 recurring6 total
7U1IntroductionVery likely86%5.89%4 lecture hrsBalancedexam 7% · syllabus 9%Steady1 recurring5 total
8U2Elements of CLikely71%89%4 lecture hrsBalancedexam 8% · syllabus 9%Steady1 recurring6 total
9U3Input and OutputLikely71%57%3 lecture hrsBalancedexam 5% · syllabus 7%Steady1 recurring3 total
10U10File HandlingLikely57%6.24%2 lecture hrsBalancedexam 5% · syllabus 4%Steadynone repeat4 total

Study smart, not hard

Drag the slider: studying the top 7 units in priority order covers ~83% of all observed marks.

  1. ~80% line

Lecture time vs exam marks

Where the exam pays more than the curriculum spends: ● lectures vs ● exam marks, as a share of the whole course. A long teal-leading bar = high-yield unit.

U5Control Statements
16% of lectures → 17% of marks
U6Arrays and Strings
13% of lectures → 16% of marks
U7Functions
13% of lectures → 14% of marks
U4Operators and Expressions
11% of lectures → 11% of marks
U9Structure and Union
9% of lectures → 9% of marks
U8Pointers
9% of lectures → 9% of marks
U1Introduction
9% of lectures → 7% of marks
U2Elements of C
9% of lectures → 8% of marks
U3Input and Output
7% of lectures → 5% of marks
U10File Handling
4% of lectures → 5% of marks

Topics are the official CSC115 syllabus units. Predictions are data-driven probabilities computed from 7 past papers (2074-2081) by mapping each real question to its syllabus unit. They indicate what has historically been likely, not guaranteed questions. Always study the full syllabus.