This document provides information about a fully solved assignment for the subject of C Programming and Data Structures for the first semester of a B.Sc IT program. It includes 6 questions covering topics like the C program structure, bubble sort algorithm, structures, file handling functions, implementing a stack using arrays, and the selection sort algorithm. Students are instructed to send their semester and specialization details to a provided email or call a phone number to receive the solved assignment.
The Lab assignment will be graded out of 100 points. There are .docx
Get fully solved C Programming assignments for BSC IT semester 1
1. Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
ASSIGNMENT
PROGRAM B.SC IT
SEMESTER FIRST
SUBJECT CODE & NAME BT0065, C Programming and Data Structures
CREDIT 3
BK ID B0949
MAX.MARKS 60
Note:Answer all questions.Kindlynote that answersfor 10 marks questionsshouldbe approximately
of 400 words. Each questionis followedbyevaluationscheme.
Q.1 Explainthe structure of the C program.
Answer:A C program basicallyhasthe followingform:
PreprocessorCommands
Functions
Variables
Q.2 Explainbubble sort with the helpof an example.
Answer: Bubble sorting is one of the simplest sorting algorithm that we can use to sort an array or a
structure. Though it is so simple to implement in a C program, bubble sort is also considered as an
inefficient sorting algorithm. Bubble sort comes handy in cases where the total number of elements to
be sorted is so small (may be in the 100’s range). When the data size is large/huge bubble sort is seldom
used in practical programming world. Let’s analyse bubble sort algorithm in detail by implementing it as
a C program.
2. Q.3 What is structure? What is its importance? Explain with an example how to declare and initialize
structure.
Answer: A structure is a collection of variables under a single name. These variables can be of different
types, and each has a name which is used to select it from the structure. A structure is a convenient way
of groupingseveral piecesof relatedinformationtogether.
A structure can be defined as a new named type, thus extending the number of available types. It can
use otherstructures,arrays or pointersassome of its
Q.4 Explainall file openfunctionswith examples.
Answer:File handlingisacore concept in programminglanguage.
File handlingfunctions
fopen()
FILE *fopen(constchar*path,const char *mode);
The fopen() function is used to open a file and associates an I/O stream with it. This function takes two
arguments. The first argumentis a pointer to a string containing name of the file to be opened while the
secondargumentisthe mode inwhichthe file isto be opened.The mode canbe :
‘r’ : Opentextfile forreading.The streamis
Q.5 Write a program to implementstack usingarrays.
Answer:
#include
#define SIZE4
voidpush();
voidpop();
Q.6 Write an algorithm for selection sort. Sort the list given below in ascending order by using this
sorting technique.64,25, 12, 22 , 11
Answer: Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time
complexity, making it inefficient on large lists, and generally performs worse than the similar insertion
sort. Selectionsortisnotedforitssimplicity,andithas
Dear students get fully solved assignments
3. Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601