0% found this document useful (0 votes)
3 views8 pages

Question Set Hackathon

The document outlines the C Programming Assessment for Hackathon 2026, consisting of two sets of questions. Each set includes short questions and code snippets to assess candidates' understanding of C programming concepts and their coding skills. The total duration for the assessment is 2 hours, with specific tasks for two candidates during the coding sections.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

Question Set Hackathon

The document outlines the C Programming Assessment for Hackathon 2026, consisting of two sets of questions. Each set includes short questions and code snippets to assess candidates' understanding of C programming concepts and their coding skills. The total duration for the assessment is 2 hours, with specific tasks for two candidates during the coding sections.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

HACKATHON 2026

POWERED BY D&D LEARNING PRIVATE LIMITED


TOTAL DURATION: 2 HOURS. -------------------------------------------------------

C Programming Assessment – Set A

Section A – Short Questions: (10 × 2 = 20 Marks)

1. What is C programming language?

2. Who developed the C programming language?

3. What is the purpose of the main () function?

4. What is the difference between printf() and scanf()?

5. What are variables in C?

6. What is the difference between int and float data types?

7. What is an operator? Name any four arithmetic operators.

8. What is the use of the if statement?

9. What is a loop? Name the three types of loops in C.

10. What is an array? Give one example.

Section B – Code Snippets: (5 × 6 = 30 Marks)

Q1. Find the Output

#include <stdio.h>

int main()

{ int a = 10; int b =

5; printf("%d", a + b *

2); return 0;

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

Q2. Find the Error

#include <stdio.h>

int main()

{ int x = 10

printf("%d", x);

return 0;

Q3. Find the Output

#include <stdio.h>

int main()

{ int

i;

for(i = 1; i <= 3; i++)

printf("%d ", i);

return 0;

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

Q4. Find the Error

#include <stdio.h>

int main()

{ int a =

5; if(a =

10)

printf("Eq

ual");

return 0;

Q5. Find the Output

#include <stdio.h>

int main()

{ int x =

8;

if(x > 5)

printf("Hello"); else

printf("World");

return 0;

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

Coding :

Cricket Score Analyzer

Store runs scored by 11 players in an array.

Display:

• Highest scorer

• Lowest scorer

• Team total

• Average score

• Number of players scoring above 50

Electricity Bill Generator

An electricity company charges:

• First 100 units → ₹5/unit

• Next 100 units → ₹7/unit

• Remaining units → ₹10/unit

Input the number of units consumed and calculate the total bill.

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

C Programming Assessment – Set B (Second Year)

Section A – Short Questions: (10 × 2 = 20 Marks)

1. What is the difference between a local variable and a global variable?

2. Explain the purpose of the break statement.

3. What is the difference between while and do-while loops?

4. What is a function in C? Why is it used?

5. What is recursion?

6. What is a pointer?

7. What is the difference between call by value and call by reference?

8. What is a string in C? Which header file is commonly used for string functions?

9. What is the purpose of the switch statement?

10. What is the difference between = and == in C?

Section B – Code Snippets: (5 × 6 = 30 Marks)

Q1. Find the Output

#include <stdio.h>

int main()

{ int a = 2, b =

3;

printf("%d", a++ + ++b);

return 0;

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

Q2. Find the Error

#include <stdio.h>

int main()

int arr[3] = {10,20,30};

printf("%d", arr[3]);

return 0;

Q3. Find the Output

#include <stdio.h>

int main()

{ int i =

5;

while(i > 2)

printf("%d ", i);

i--;

return 0;

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

Q4. Find the Error

#include <stdio.h>

void display();

int main()

{ display

();

return 0;

void display(int x)

printf("%d", x);

Q5. Find the Output

#include <stdio.h>

int main()

char str[] = "CSE";

printf("%c", str[1]);

return 0;

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.
HACKATHON 2026
POWERED BY D&D LEARNING PRIVATE LIMITED
TOTAL DURATION: 2 HOURS. -------------------------------------------------------

Coding:

1) A college has 10 students.

Write a program to:

• Input marks of 10 students in an array.

• Calculate the average marks.

• Count how many students passed (marks ≥ 40).

• Count how many students failed.

2) There are four candidates.

Input the vote count for each candidate.

Display:

• Total votes

• Winning candidate

• Percentage of votes received by each candidate

NOTE: Candidate 1: Will do the coding.


Candidate 2: Will attend to the remaining questions.

You might also like