0% found this document useful (0 votes)
18 views3 pages

Tutorial 4

This document is a tutorial sheet for a Software Development Fundamentals course, detailing various programming exercises and questions related to C programming concepts. It includes questions on output prediction for given C code snippets, as well as programming tasks to implement specific functionalities such as printing patterns and calculating factorials. The tutorial aims to enhance understanding and application of C programming constructs.

Uploaded by

992501030287
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)
18 views3 pages

Tutorial 4

This document is a tutorial sheet for a Software Development Fundamentals course, detailing various programming exercises and questions related to C programming concepts. It includes questions on output prediction for given C code snippets, as well as programming tasks to implement specific functionalities such as printing patterns and calculating factorials. The tutorial aims to enhance understanding and application of C programming constructs.

Uploaded by

992501030287
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

ODD 2025, 15B11CI311 – Software Development Fundamentals - I

Course Coordinator: Akanksha Mehndiratta, Dr. Vikas Sharma


JIIT, Sec-128, Noida

ODD 2025
Tutorial Sheet – 4
Software Development Fundamentals – I (15B11CI111)
CO2 Explain basics of C programming concepts to make decision Understand (Level 2)
for solving problems
CO4 Use various C programming constructs to implement iteration, Apply (Level 3)
and recursion
Note: Students are advised to submit their solutions to their respective tutorial
faculties

Q1[CO2]. What will be the output of the C program?


#include<stdio.h>
int main()
{
​ int i;
​ for(i = 0; i>9; i+=3)
​ {
​ printf("for ");
​ }
​ return 0;
}

Q2[CO2]. What will be the output of the C program?


#include<stdio.h>
int main()
{
​ int i = 1, j = 1;
​ for(--i && j++ ; i<10; i+=2)
​ {
​ ​ printf("loop ");
​ }
​ return 0;
}

Q3[CO2]. What will be the output of the C program?


#include<stdio.h>
int main()
{
​ for(5;2;2)
​ printf("Hello");
​ return 0;
}

Q4[CO2]. What will be the output of the C program?


#include<stdio.h>
int main()
{
int n;
for (n = 9; n!=0; n--)
printf("n = %d", n--);
return 0;
}
ODD 2025, 15B11CI311 – Software Development Fundamentals - I
Course Coordinator: Akanksha Mehndiratta, Dr. Vikas Sharma
JIIT, Sec-128, Noida

Q5[CO2]. What will be the output of the C program?

#include <stdio.h>
int main()
{
int c = 5, no = 10;
do {
no /= c;
} while(c--);

printf ("%dn", no);


return 0;
}

Q6[CO4]: Write C programs to print the following patterns:


(a) (b)

(d)
(c)

Q7[CO4]. Write C Programs to do the following:


(i)​ Write a program in C language for printing all the odd / even numbers within a
given range using the while loop.
(ii)​ Write a program in C language to print the addition of numbers within a range.
(iii)​ Write a program in C language to print the factorial of a number.
(iv)​ Write a program in C language to print all the uppercase letters.

(v)​ Write a program in C language to print the multiplication table of an integer

(vi)​ Write a program to print the square roots of all the numbers within a range.

(vii)​ Write a program in C to print a range of numbers (between a to b) that are divisible
by 5.

(viii)​ Write a program in C to print arithmetic progression and its sum.


ODD 2025, 15B11CI311 – Software Development Fundamentals - I
Course Coordinator: Akanksha Mehndiratta, Dr. Vikas Sharma
JIIT, Sec-128, Noida
(ix)​ Write a C program to print all Armstrong Numbers from 1 to N.

Q.8 [CO2]Write a C program that will read the value of x and evaluate the following function
y={1 for x>0 ; 0 for x =0; -1 for x <0 }

using
(a) nested if statements.
(b) else if statements

Q9. [CO2] The output of the following segment when executed is:

#include <stdio.h>
void main(){
int a=10, b=5;
if(a>b){
if(b>5)
printf("%d",b);
}
else
printf("%d",a);
}

You might also like