⯈Algorithm and its Characteristics
⯈Elementary Problems
- Addition of two numbers
- Calculate area and circumference of circle
- Calculate area of triangle
- Calculate simple interest
- Calculate slope and distance between two points
- Convert length in feet to inches
- Weighted score in exam
- Convert temperature in degree Celsius to Fahrenheit
- Swap two numbers
- Swap two numbers without using extra variable
- Overview of C Programming Language
- Getting started with C Programming Language
- Keywords
- Identifiers
- Constants
- Operators
- Expression Evaluation
- Mathematical expression to C equivalent expressions
- Datatypes
- Variables
- Integer representation in C
- Character representation in C
- Type conversion in C
- sizeof operator
- Comments
- Mathematical Functions
- input output statements
- width specifiers in C
- structure of a C program
- header files
- Compilation process of a C program
- Types of initializations.
⯈Basic C Programs
- C program to add two numbers
- C program to find area and circumference of circle
- C program to swap two numbers
- C program to swap two numbers without using extra variable
- C program to swap two numbers using bitwise XOR
- C program to convert temperature in Celsius to Fahrenheit
- C program to calculate gross salary of an employee
- C program to count number of digits in a positive integer
- C program to count number of digits in binary representation
- C program to count number of digits in base ‘K’
- C program to convert kilometer to meter, feet, inches and centimeters
- C program to find first and last digit of a number
- C program to find minimum number of currency denominations
- C program to convert cartesian coordinates to polar coordinates
- C program to find distance between two places on earth in nautical miles
- C program to find slope and distance between two points
- C program to add 1 to the number using ‘+’ operator
- C program to find maximum of two numbers using ternary operator
- C program to find maximum of three numbers using ternary operator
- C program to find kth bit of a number
- C program to find last four bits of a byte
- C Program to reset right most set bit of a number
Contents of C programming language
In this C tutorial, we will study about the C Programming in detail. The tutorial covers various concepts of C programming. At the end of each chapter there will be a quiz pertaining to that chapter, questions asked in previous exams along with GATE and Interview questions. Every concept may have a video explanation along with the code, which will be traced line by line, by drawing the memory diagrams wherever needed. Let us see the contents of C programming in detail that we are going to discuss.
Contents of C Programming:
- Introduction to problem solving.
- Basics of C programming.
- Conditional statements.
- Iterative statements.
- User Defined Functions.
- Storage classes.
- Pointers.
- Recursion.
- Function pointers.
- Arrays.
- Strings.
- Structures and Unions.
- Files.
- Memory management
- Bit wise operations.
- Preprocessors.
- Threads.
Starting with we will discuss problem solving concepts, since we write computer programs to solve the real world problems. Here we will discuss how to write an Algorithm and Flowchart for any given problem.
In the second chapter we will cover with the basics of C Programming, where we will see the brief history of C, the software’s written in C and why we should start with C programming language. We will also discuss how to we install the compilers (IDE) in a step by step manner.
In this chapter we will also discuss the basic concepts of C programming i.e., Keyword, Identifiers, Constants, Operators, Expression evaluation, Data-types, Variables, Input-Output statements, Integer representation and Character representation, Integer Overflow, Comments, Compile Time and Run Time Initialization, Structure of a C program, sizeof operator, commonly used mathematical functions and some basic C programs.
The third chapter covers the conditional statements. There are two types of conditional statements
- Conditional
- Un-conditional
In conditional statements we will study about if, if – else, else – if ladder and switch statement.
In Unconditional statements we will study break, continue and the goto statements.
In the fourth chapter we will discuss about the iterative statements, also called as Loops. We use loops whenever there is repetition in the program. There are three loops which we will discuss while loop, for loop and the do-while loop. At the end of the chapter we will discuss the nested loops.
The fifth chapter covers the important topic on the functions. We use functions whenever we see that a certain functionality is repeated. In this chapter we will discuss in particular about the User Defined Functions (UDF). We will also discuss about the variadic functions.
In the sixth chapter we will discuss about the storage classes. Storage classes says about the scope, the lifetime of the variables or functions. We will discuss in detail about the different types of storage classes viz. auto, extern, static and register.
The seventh chapter covers one of the distinguished and important features of the C Language, i.e., “the pointers”. The pointers are used to store the address of the variable. We will also discuss call by value and call by reference.
In the eight chapter we will discuss the recursion. A function that calls itself is the recursion. We will discuss different programs on recursion, which involves local, global, static and pointer variables.
The ninth chapter covers the concept of Function Pointers. Here we will see how we pass a function as an argument to another function.
In the tenth chapter, we will discuss about the arrays. We use arrays when we have large variables of same data type. Array is also called as homogeneous datatype. We will discuss different dimensions of arrays, 1D Arrays, 2D Arrays and multi-dimensional arrays.
The eleventh chapter covers strings. It is an array of characters. We will discuss strings as well as an array of strings.
In the twelfth chapter we will discuss the heterogeneous data-type structures and unions. Arrays are used to store homogeneous data type. To store the data of a student which contains name, roll number, cgpa all are of different datatypes we prefer structures.
The thirteenth chapter covers the concept of FILES. FILES are used to store the data permanently on the secondary storage.
In the fourteenth chapter we will discuss about the dynamic memory allocation. How do we allocate the memory at the run time. How do we change the memory while we run the program.
The fifteenth chapter covers about the bit-wise operators. We will also discuss some of the interview questions on the bitwise operators.
In the sixteenth chapter we will discuss about the C preprocessors. We will discuss about the Macro Expansion, File inclusion and Conditional Compilation.
The seventeenth chapter covers the multi programming feature , i,e. threads. The threads are used in operating systems, embedded systems to speed up the process.