KEMBAR78
C Language CT-1&2 | PDF | Software Development | Software Engineering
0% found this document useful (0 votes)
29 views3 pages

C Language CT-1&2

The document contains two assessments for first-year B.Tech students in Computer Applications at the National Institute of Technology, Tiruchirappalli. Each assessment includes various programming tasks, such as developing algorithms, flowcharts, and C programs to solve specific problems. Topics covered include loops, library functions, and recursion, with a total of 20 marks for each assessment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

C Language CT-1&2

The document contains two assessments for first-year B.Tech students in Computer Applications at the National Institute of Technology, Tiruchirappalli. Each assessment includes various programming tasks, such as developing algorithms, flowcharts, and C programs to solve specific problems. Topics covered include loops, library functions, and recursion, with a total of 20 marks for each assessment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

NATIONAL INSTITUTE OF TECHNOLOGY, TIRUCHIRAPPALLI

DEPARTMENT OF COMPUTER APPLICATIONS

First Year B.Tech (ECE-A)

ASSESSMENT-I

CSIR11 INTRODUCTION TO COMPUTER PROGRAMMING 21-12-2022

ANSWER ALL 20 MARKS

1. If ages of Ram, Shyam and Ajay are input through the keyboard, develop an
algorithm to determine the youngest of three. Mention the type of input and output
for the algorithm. (2 Marks)
2. A triangle is valid if the sum of all the three
angles is equal to 180 degrees. Draw the
flowchart for the algorithm to check whether a triangle is valid or not, when the
three angles of the triangle are entered through the keyboard. (3 Marks)

3. Find the output of the given program and mention the values of the declared
variables after execution. (1 Mark)

#include <stdio.h>
int main()

int j-10,k=12;
iftk=i)

k=i;
j=k;

return 0;

4. Sundar wants a one-liter water bottle from the "BB" stationery shop that is made by
the "AAA" brand. Only "BB" and "CC" stationary stores sell the bottles of the
aforementioned brands. Cost each bottle is Rs. 75. Consider about Sundar's situation

1/2
and all the possibilities; draw the flowchart for buying three bottles of the specified
brand. (2 Marks

5. Write the differences between while and do-while loop with suitable example. (2
Marks).

6. Explain any sixlibrary functions with suitable example code. (3 Marks)

7. A company insures its drivers in the following cases

) If the driver is married


If the driver is unmarried, male and above 30 years of age
ii) If the driver is unmarried, female and above 25 years of age

In all other cases, the driver is not insured. If the marital status, gender and age of
the driver are the inputs, write a program to determine whether the driver should be
nsured or not. (3 Marks)

8. Write a program to print Floyd's triangle. Check the given Floyd's triangle for
reference. (2 Marks)

1
23
456
789 10

9. Debug the errors from the given code. (1 Mark)

void main({
int 8y;

scanf"%d6f",&x,&y);
/swopping9
X=xty;
y=X-Y;
x=x-y;
printf"%d %d"xy);

10. Explain break and continue statements with suitable example. ( 1 Mark)

G O o d Luck..auase aoe
*******

2/2
NATIONAL INSTITUTE OF TECHNOLOGY, TIRUCHIRAPPALLI

DEPARTMENT OF COMPUTER APPLICATIONS

First Year B.Tech (ECE -A)

ASSESSMENT II
CSIR11 INTRODUCTION TO COMPUTER PRoGRAMMING 25-01-2023

. ANSWER ALL 20 MARKS

1. There are two functions in a number game. Ten numbers are entered
from the keyboard into an array. One function will subtract the value 1
from all the numbers in the array, and another function will multiply al
the numbers in the array by 6. Pass the entire array to both the
functions and return the new vaules to the main function and print it.
(5 Marks)

2. Develop a C program to find the largest element in an array using


recursion. (5 Marks)

3. A kinder garden school is planning to conduct a word game. Ten words


will be given to the student and the student has to the vowels
remove
from the given words and have to print it in upper
case. Help them to
implement the word game by developing a C program using functions
for the above mentioned tasks. (5 Marks)

4. Consider first four numbers of the given series 40, 30, 22, and 16.
Analyse the pattern of the given series and write a C program to find the
next four numbers of this series and print the
complete series.( 5 Marks)

*******es.Good Luck..

You might also like