Visvesvaraya Technological University Belgaum, Karnataka, India
Bachelor Of Engineering (CPP001)
Summary
Summary C Programming complete notes
3 views 0 purchase
Course
Bachelor Of Engineering (CPP001)
Institution
Visvesvaraya Technological University Belgaum, Karnataka, India
This is a complete C programming Theory to Practical Research notes with clear theoretical explanations and practical examples. Providing code snippets, diagrams, and real-world scenarios that can enhance your learning experience.
Here's a general outline of the content and topics covered in the n...
Visvesvaraya Technological University Belgaum, Karnataka, India
Bachelor Of Engineering (CPP001)
All documents for this subject (30)
Seller
Follow
amanulhaque1298
Content preview
COMPLETE C PROGRAMMING PRACTICAL THEORY
Learn C, with Amanul Haque[BE-EEE_VTU] and Watch the Path to Mastery Unfold
General syntax of C-programing
< HEADER FILE >
<USER DEFINED FUNCTION>
INT MANIN()/
VOID MAIN()
OPEN BRACES {
<VARIABLE DECLARATION>
<PRINTF() & SCANF()>
GETCH()
CLOSED BRACES}
, COMPLETE C PROGRAMMING PRACTICAL THEORY
Learn C, with Amanul Haque[BE-EEE_VTU] and Watch the Path to Mastery Unfold
page no.
1. Introduction………………………………………………………………………………..4
2. Header file…………………………………………………………………………………..4
a) GS to declare header file…………………………………………………………4
b) Input functions……………………………………………………………………….5
c) output functions……………………………………………………………………..5
d) printf() function …………………………………………………………………….5
e) scanf() function …………………………………………………………………….6
f) comments ………………………………………………………………………………6
3. User-defined function ……………………………………………………………………7
4. int main() and void main() ……………………………………………………………7
5. Data type ………………………………………………………………………………………..7
a) Key Words …………………………………………………………………………….8
b) Identifier ………………………………………………………………………….8
c) Rules to make variables ………………………………………………………8
d) Types of Variable ………………………………………………………………...9
e) Escape sequence ………………………………………………….………10-11
6. Operators ………………………………………………………………………………12-13
a) Unary …………………………………………………………………………………13
b) Binary ……………………………………………………………………………….14
c) Ternary …………………………………………………………………………….14
d) Special ………………………………………………………………………………14
7. Control Structure ……………………………………………………………………….14
a) If Statement ……………………………………………………………………...14
b) If-else Statement …………………………………………………………….. 15
c) If-else if ladder …………………………………………………………………16
8. Switch case statement ……………………………………………………………….17
9. Looping ……………………………………………………………………………...…18-19
a) Elements of loop ……………………………………………………………….19
b) For loop ……………………………………………………………………………19
c) While loop ………………………………………………………………………20
d) Do-while loop ………………………………………………………………….20
e) Break statements ……………………………………………………………21
f) Continuous statements …………………………………………………...21
10. Array ……………………………………………………………………………………...22
a) Memory representation of Array ………………………………… 22
b) How to take input in Array ……………………………………………23
c) How to display the content of the array ………………………..23
, COMPLETE C PROGRAMMING PRACTICAL THEORY
Learn C, with Amanul Haque[BE-EEE_VTU] and Watch the Path to Mastery Unfold
11. Function ………………………………………………………………………………24
a) Function call …………………………………………………………….24
b) Return type function ………………………………………………..25
c) Parameters in Python function …………………………….….25
d) Ways of calling function ………………………………………….25
e) Recursion ……………………………………………………………26-27
12. Pointers ……………………………………………………………………………..28
a) Declaration of pointers ………………………………………...28
b) Dereferencing pointer variable …………………………… 28
13. String ……………………………………………………………………………29-31
a) GS to declare string ……………………………………………….31
b) Memory representation of a string ……………………...31
c) How to take input in string …………………………………..31
d) string function ……………………………………………………...32
14. Structure …………………………………………………………………..…33-34
a) GS to declare structure ………………………………………..34
b) Typedef keyword ………………………………………………..34
15. File handling ……………………………………………………………………35
a) File pointer ………………………………………………………...35
b) File handling function ………………………………………...35
16. Dynamic Memory Allocation ………………………………………36-37
a) Malloc() function ………………………………………………..37
b) calloc() function ………………………………………………..37
c) realloc() function ……………………………………………….37
d) free() function ……………………………………………………38
, COMPLETE C PROGRAMMING PRACTICAL THEORY
Learn C, with Amanul Haque[BE-EEE_VTU] and Watch the Path to Mastery Unfold
1. Introduction
C is a high-level, general-purpose programming language that was developed in the early 1970s
by Dennis Ritchie at Bell Labs. It is one of the most widely used and influential programming
languages and has had a significant impact on the development of many other languages.
2. < HEADER FILE >
Header file is a collection of functions that contain declarations and definitions of functions, constants,
data types, and other items that can be used in a C program.
Header files serve as a form of documentation for the functions and data structures provided by a
library or module. They allow programmers to use these functions and data structures without knowing
the implementation details. Instead, they only need to include the header file in their C source code.
Header files have the extension ".h"
The general syntax to declare Header file
[ #include<header file name.h> ]
preprocessor directive Extension of a header file
collection of function
In C, the #include is a preprocessor directive that instructs the compiler to include the contents of a
specified header file in the source code before the compilation process takes place. It allows you to use
functions, types, and macros defined in the included header file.
Example:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
<stdio.h>: stands for "standard input-output.h." This header file contains functions for input and
output operations and is essential for interacting with the console and handling file input and output.
<stdlib.h>: It provides functions for general-purpose tasks, such as memory allocation.
<math.h>: It provides declarations and functions for mathematical operations and functions. When you
include "math.h" in your C program, you gain access to various mathematical functions such as
trigonometric functions, logarithmic functions, exponential functions, and more.
#include<math.h>
the preprocessor directive which tells the compiler to include the standard C library header file
"math.h" in the program.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller amanulhaque1298. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $2.99. You're not tied to anything after your purchase.