0% found this document useful (0 votes)
28 views

C

C pdf

Uploaded by

krishnabhuva934
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

C

C pdf

Uploaded by

krishnabhuva934
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Master of Computer Applications


Level: Post Graduate
Course / Subject Code : MC01094011
Course / Subject Name : Programming with C

w. e. f. Academic Year: 2024-25


Semester: 1
Category of the Course: Core Course

Prerequisite: Basic Mathematics and knowledge about number systems


Rationale:  Learn about the data types, operators and functions in C programming language.
 To be able to write code in C programming language for simple problems

Course Outcome:
After Completion of the Course, Student will able to:
No. Course Outcomes RBT Level*
1 Formulate algorithm/ flowchart for given arithmetic and logical problem. UN

2 Translate algorithm/flowchart into C program using correct syntax of AP


Operator, conditional & branching statements, iteration and execute it.
3 Write C programs using the concepts of array and functions. AP
4 Write C programs using the concepts of pointers, structure and union. AP

5 Develop an application using the concepts file management to solve CR


problems.
*RM: Remember, UN: Understand, AP: Apply, AN: Analyze, EL: Evaluate, CR: Create

Teaching and Examination Scheme:


Teaching Scheme Total Credits
Assessment Pattern and Marks
(in Hours) L+T+ (PR/2)
Total
Theory Tutorial / Practical Marks
L T PR C
ESE (E) PA / CA (M) PA/CA (I) ESE (V)
3 0 4 5 70 30 20 30 150

Course Content:
Unit No. of % of
Content
No. Hours Weightage

w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 1 of 6


GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Master of Computer Applications
Level: Post Graduate
Course / Subject Code : MC01094011
Course / Subject Name : Programming with C
Programming Language, Compiler, Interpreter, Liker, Loader, 7 15%
Classification of Programming, Algorithm, Flowchart, Structure of a C
1. Program, First C Program, Comments, C Tokens, Basic data types in C,
Variables, Operators & Expression in C, Type conversion and
Typecasting.
Basic Screen & Keyboard Input & Output, Introduction to Decision 9 20%
2. Control Statements, Conditional execution & selection statements,
Iterative Statements, Nested Loops, Special Control Statement.
Introduction to Array, One Dimensional Array, Multi-Dimensional 9 20%
Array, Introduction to String, Character & string Functions, Array of
String
3. Introduction to User Defined Functions, Using Functions, Function
Declaration/Function Prototype, Function Definition, Function call,
return statement, Passing Parameters to the function, scope of variables,
Storage classes, Recursive Functions, Analysis of Algorithm.
Introduction, Understanding Memory Addresses, Address Operator (&), 12 25%
Introduction to Pointers, void Pointer, Null Pointer, Use of Pointers,
Arrays and Pointers, Pointer and String, Pointer Arithmetic, Pointers to
Pointers, Array of Pointers, Pointers to an Array, Two-dimensional
Arrays and Pointers, Pointers to Functions, Dynamic Memory
4.
Allocation.
Structure, Structure Declaration, Assessing member of structure,
Initialization of Structure, Nesting of Structure, Array of Structure,
Array within structure, Structure and Function, Structure and Pointer,
Union, Enumeration type, Bit fields.
Using Files in C, Declaration, Opening and Closing of a File, Working 8 20%
with Text Files and Binary Files, Character Input and Output, End of
File (EOF), feof() Function, Direct File Input and
Output , Files of Records, Random Access to Files of Records,
5.
Other File Management Functions:
Bitwise Operator (Bitwise AND, Bitwise OR, Bitwise Exclusive-OR,
Bitwise NOT, Bitwise Shift Operator), Command-line Arguments, The
C Preprocessor, Type Qualifier.
Total 45 100

References/Suggested Learning Resources:

Textbook:
1. Pradip Dey, Manas Ghosh, “Programming in C”, 2nd Edition, 2018, Oxford University Press,
ISBN: 978-01-9949-147-6.

w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 2 of 6


GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Master of Computer Applications
Level: Post Graduate
Course / Subject Code : MC01094011
Course / Subject Name : Programming with C

Reference Books:
1. E. Balaguruswamy, “Programming in ANSI C”, 8th Edition, 2019, McGraw Hill Education,
ISBN: 978-93-5316-513-0.
2. Yashavant P. Kanetkar, “Let Us C”, 16th Edition, 2019, BPB Publications, ISBN: 978- 93-8728-
449-4.
3. Reema Thareja. “Programming in C”, 2nd Edition, Oxford University Press.
4. C: The Complete Reference, by Herbert Schildt, Publisher – Tata McGraw Hill.

Suggested Course Practical List:

1. Write a program to that performs as calculator (addition, multiplication, division, subtraction).


2. Write a program to find area of triangle(a=h*b*.5)
a = area h = height b = base.
3. Write a program to calculate simple interest (i = (p*r*n)/100 )
i = Simple interest p= Principal amount r = Rate of interest n = Number of years.
4. Write a C program to interchange two numbers.
5. Write a C program to enter a distance in to kilometre and convert it in to meter, feet, inches and
centimetre.
6. Write a program to compute Fahrenheit from centigrade (f=1.8*c +32).
7. Write a C program to find that the accepted number is Negative, Positive or Zero.
8. Write a program to read marks of a student from keyboard whether the student is pass or fail
(using if else)
9. Write a program to read three numbers from keyboard and find out maximum out of these three.
(nested if else)
10. Write a C program to check whether the entered character is capital, small letter, digit or any
special character.
11. Write a program to read marks from keyboard and your program should displayequivalent
grade according to following table(if else ladder)
Marks Grade
100 - 80 Distinction
79 - 60 First Class
59 - 40 Second Class
< 40 Fail
12. Write a c program to prepare pay slip using following data.Da = 10% of basic, Hra = 7.50% of

w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 3 of 6


GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Master of Computer Applications
Level: Post Graduate
Course / Subject Code : MC01094011
Course / Subject Name : Programming with C
basic, Ma = 300, Pf = 12.50% of basic, Gross = basic + Da + Hra + Ma, Nt = Gross – Pf.
13. Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday.
14. Write a C program to find out the Maximum and Minimum number from given10 numbers
15. Write a C program to find factorial of a given number.
16. Write a program to reverse a number.
17. Write a program to generate first n number of Fibonacci series
18. Write a program to calculate average and total of 5 students for 3 subjects (use nested for loops)
19. Read five persons height and weight and count the number of person having height greater
than 170 and weight less than 50,
20. Write a program to check whether the given number is prime or not.
21. Write a program to evaluate the series 1^2+2^2+3^2+……+n^2
22. Write a C program to find 1+1/2! +1/3! +1/4! +. ..... +1/n!
23. Write a program to print following patterns :
i * ii * iii *****
** * * ****
*** * * * ***
**** * * * * **
***** * * ** * *
24. Write a program to print following patterns :

i) 1 ii 12345 iii) 55555 iv) 1


12 1234 4444 22
123 123 333 333
1234 12 22 4444
12345 1 1 55555
25. Write a program to print following patterns:
i) AAAAA ii) ABCDE
BBBB ABCD
CCC ABC
DD AB
E A
26. Write a C program to read and store the roll no and marks of 20 students using array.
27. Write a program to find maximum element from 1-Dimensional array.
28. Write a program to sort given array in ascending order.

w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 4 of 6


GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Master of Computer Applications
Level: Post Graduate
Course / Subject Code : MC01094011
Course / Subject Name : Programming with C
29. Write a program to replace a character in given string.
30. Write a program to reverse string.
31. Write a program to convert string into upper case.
32. Write a program that defines a function to add first n numbers.
33. Write a function in the program to return 1 if number is prime otherwise return 0
34. Write a program to find factorial of a number using recursion.
35. Write a function that will scan a character string passed as an argument and convert all
lowercase character into their uppercase equivalents
36. Write a program to read structure elements from keyboard.
37. Define a structure type struct personal that would contain person name, joining date and salary
using this structure to read this information of 5 people and print the same on screen.
38. Define structure data type called time_struct containing three member’s integer hour, integer
minute and integer second. Develop a program that would assign values to the individual number
and display the time in the following format: 16: 40:51
39. Design a structure student_record to contain name, branch and total marks obtained. Develop a
program to read data for 10 students in a class and print them.
40. Write a program to print address of variable using pointer.
41. Write a C program to swap the two values using pointers.
42. Write a C program to print the address of character and the character of string using pointer.
43. Write a program to access elements using pointer.
44. Write a program to read, print and addition of two Matrices using pointer and user define
functions.
45. Write a program for sorting using pointer.
46. Write a program to read n integer number from keyboard and store them into a file All.txt. Read
All.txt file, separate even and odd numbers and store them into files Even.txt and Odd.txt
respectively and display contents of all the three files.
47. Write a program to accept the contents from the user and store it in the file one line at a time and
print the contents of the file.
48. Read a text file which name is given in command line and print the total number of character in
each line and total number of lines in a file.
49. Write a program to merge two files into the third file.
50. Program for deleting the spaces from the contents of file.

w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 5 of 6


GUJARAT TECHNOLOGICAL UNIVERSITY
Program Name: Master of Computer Applications
Level: Post Graduate
Course / Subject Code : MC01094011
Course / Subject Name : Programming with C
CO- PO Mapping:
Semester Course Name: Programming with C
1 POs & PSOs
Course PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8
Outcomes
CO1 3 2 3 3 - - - -
CO2 3 3 3 3 - - - -
CO3 3 3 3 3 - - - -
CO4 3 3 3 2 - - - -
CO5 3 3 3 2 - - - -
3.00 2.75 3.00 2.75 - - - -
Legend: ‘3’ for high, ‘2’ for medium, ‘1’ for low and ‘-’ for no correlation of each CO with PO.

*******

w.e.f. 2024-25 http://syllabus.gtu.ac.in/ Page 6 of 6

You might also like