UNIT I
Introduction to Computers: Creating and running Programs, Computer Numbering System, Storing Integers, Storing Real Numbers
Introduction to the C Language: Background, C Programs, Identifiers, Types, Variable, Constants, Input/output, Programming Examples, Scope, Storage Classes and Type Qualifiers.
Structure of a C Program: Expressions Precedence and Associativity, Side Effects, Evaluating Expressions, Type Conversion Statements, Simple Programs, Command Line Arguments.
Important Questions:
- Explain the process of Creating, Compiling and Execution of a C Program
- How are negative values stored in the memory in C programming? Explain
- How are signed and unsigned integers stored? Explain with an example
- What is Constant? Explain different types of Constants available in C with examples
- Define Identifier? Write the Rules for C Identifiers.
- Define Variable. Write about different types of variables in C
- Write a note on formatted and unformatted I/O statements
- Define Scope. Explain different types of storage classes.
- Write the importance of precedence and associativity? Write the table for operator precedence?
- What is meant by type conversion? Why is necessary? Explain about implicit and explicit type conversion with examples
- Write a short note on basic data types that the C language support. Illustrate with a C program.
- With an example program, explain how command line arguments works.
UNIT II
Bitwise Operators: Exact Size Integer Types, Logical Bitwise Operators, Shift Operators.
Selection & Making Decisions: Logical Data and Operators, Two Way Selection, Multiway Selection, More Standard Functions.
Repetition: Concept of Loop, Pretest and Post-test Loops, Initialization and Updating, Event and Counter Controlled Loops, Loops in C, Other Statements Related to Looping, Looping Applications, Programming Examples
Important Questions
- Explain arithmetic, logical and bitwise operators with examples
- Differentiate between entry- control and exit-control loops with an example.
- Demonstrate the various control statements available in ’C’?
- What are bit-fields.? Explain their significance.
- Explain the concepts of multi way selection. And write a program to determine whether an entered character is vowel or not
- Practice examples programs on loops and control structures.
UNIT III
Arrays: Concepts, Using Array in C, Array Application, Two Dimensional Arrays, Multidimensional Arrays, Programming Example – Calculate Averages
Strings: String Concepts, C String, String Input / Output Functions, Arrays of Strings, String Manipulation Functions String/ Data Conversion, A Programming Example – Morse Code
Enumerated, Structure, and Union: The Type Definition (Type def), Enumerated Types, Structure, Unions, and Programming Application.
Important Questions
- Write a C program to reverse the contents of an integer array without using another array
- Explain the memory representation of one- and two-dimensional arrays in C programming with neat diagrams
- Write a C program to interchange the largest and smallest elements in an array.
- Explain various String oriented I/O statements in C with an example each.
- With an example, How arrays of strings used in C.
- Write about various string manipulation functions.
- Explain the utility of ‘typedef’ keyword. Write a program to illustrate it.
- Write difference between structures and unions w.r.t memory allocation and accessing.
- Write the syntax to define Union? List out the advantages and disadvantages of using Unions.
- How to define new data type using Enumerated Types? Explain.
UNIT IV
Pointers: Introduction, Pointers to pointers, Compatibility, L value and R value
Pointer Applications: Arrays and Pointers, Pointer Arithmetic and Arrays, Memory Allocation Function, Array of Pointers, Programming Application.
Processor Commands: Processor Commands
Important Questions
- What is the role of L value and R Value in pointer arithmetic? Explain in detail.What is a pointer? Explain declaration, initialization and accessing of a pointer variable.
- What is the main use of function pointer in C?How do you declare a function pointer? Explain
- How are generic pointers different from pointer variables and also differentiate ptr++ and ++ptr.
- Write a C program to convert floating point number into integer using pointers
- Using pointers in functions write a C program to perform arithmetic operations on two integers.
- Write a C program that access elements of 1D array using a pointer variable.
- Explain various dynamic memory allocation functions in C with an example each.
- Write a C program to reverse the given string using a pointer.
- Write a C program to access the values of an array of characters using pointer
- Explain in detail about the types of C preprocessor directives
UNIT V
Functions: Designing, Structured Programs, Function in C, User Defined Functions, Inter-Function Communication, Standard Functions, Passing Array to Functions, Passing Pointers to Functions, Recursion
Text Input / Output: Files, Streams, Standard Library Input / Output Functions, Formatting Input / Output Functions, Character Input / Output Functions
Binary Input / Output: Text versus Binary Streams, Standard Library, Functions for Files, Converting File Type.
Important Questions
- Define Function. Write the advantages of structured programming.
- Explain perform function declaration, function call, and function definition in C.
- Explain Call by value and Call by reference. Also write differences between them.
- Write a program to calculate factorial of a number with recursion and without recursion.
- What is recursion? Write a program to find the factorial of a given number using recursion.
- How to pass an array to a function in C programming? Explain.
- Write a C program to generate Fibonacci series using recursive functions.
- Illustrate the functions for character input and output in C programming.
- Write a C program to Display contents of a text file on console.
- What do you mean by streams? What are the applications of it? Differentiate text and binary streams.
- What are various standard library input/output functions used in C language? Explain with simple program.