C Syllabus
C Syllabus
UNIT I
UNIT II
Decision making statements: if, if else, Nested if, else- if ladder, switch statements Control. Loop
statements: while loop, for loop and do-while loop. Jump Control statements: break, continue and
goto. Arrays: One Dimensional arrays - Declaration, Initialization and Memory representation; Two
Dimensional arrays -Declaration, Initialization and Memory representation.
UNIT III
Strings: Declaring & initializing string variables; String handling functions, Character handling
functions. Functions: Function Prototype, definition and calling. Return statement. Nesting of
functions. Categories of functions. Recursion, Parameter Passing by address & by value. Local and
Global variables. Storage classes: automatic, external, static and register.
UNIT IV
Structures: Basics of structure, structure members, accessing structure members, nested structures,
array of structures, structure and functions, structures and pointers. Unions - Union definition;
difference between Structures and Unions. Pointers: Pointer data types, Pointer declaration,
initialization, accessing values using pointers. Pointer arithmetic. Pointers and arrays, pointers and
functions. Dynamic Memory Management: Introduction, Functions-malloc, calloc, realloc, free.
UNIT V
Files: Introduction to Files – Using Files in C – Reading Data from Files – Writing Data to Files –
Detecting the End-of-file -Accepting Command Line Arguments.
REFERENCE BOOKS:
2. Brain W Kernighan and Dennis M Ritchie - The ‘C’ Programming language” - Pearsonpublications.
3. Ashok N Kamthane: Programming with ANSI and Turbo C, Pearson Edition Publications
SECTION-B
(OR)
(OR)
(OR)
(OR)
(OR)
B) How to read the data from the file? Explain?
Question Bank
Unit-I
Unit-II
Unit-III
Unit-IV
Unit-V
Unit-I
Unit-II
Unit-III
Unit-IV
Unit-V
3. Write a program to swap two numbers using third variable and without using thirdvariable.
7. Write a program to print the result of a student by using the following conditions.
10. Write a program to find whether the given number palindrome or not
11. Write a program to find whether the given number is perfect or not.
14. Write a c program to find the sum of individual digits of a positive integer.
21. Write a program to find number of vowels, consonants and words in a given string.
22. Write a program to find whether the given string is palindrome or not.
23. Write a program to find factorial of given number using recursion.
24. Write a program to pass the array element to the function. Use the call by valuemethod and call
by reference.
25. Write a program to define a structure and initialize its member variables.
27. Write a program to declare pointer to structure and display the contents ofthe structure.