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

Learning C Programming

The document provides an overview of C programming, including the use of special characters, header files, and the structure of functions. It explains the concept of variables, their naming conventions, and different types of variables such as char, int, float, and double. Key points include the importance of return values in functions and the syntax rules for defining variables.

Uploaded by

mpplat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Learning C Programming

The document provides an overview of C programming, including the use of special characters, header files, and the structure of functions. It explains the concept of variables, their naming conventions, and different types of variables such as char, int, float, and double. Key points include the importance of return values in functions and the syntax rules for defining variables.

Uploaded by

mpplat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Learning C Programming

======================

Special character of C programming


==================================

- \n - new line

Understanding Header File


=========================
- It contains a lot of predefined function
- You can use the functions in the header file again and again by calling
header file
- #include <header_file_name>
- #include <stdio.h> - this statement to call use the
functions in stdio.h file

Structure of the function


=========================

- int main() - this is the start of the function


- int is the return variable of the function
- main is the function name
- inside the bracket (), you can put the parameter
- {} - every function must be start with { and end with }
- return - every function must retrun the value
- return 0; - it means that the fuction will return no
value, otherwise the function will return integer value
- stetements - statement or commands, every statement must be
ended with ;

Variable
========
- Data stored in objects
- Named objects are called varialbe - int age ( in this case, age is variable
becaue it is named object)
- Data placed in the variable is called value - age=10 ( in this case, 10 is
value because it is placed in the variable)
- There are many types of variable

Naming of variable
==================
- Must begin with letter, digit and underscore
- Do not start with _ because a lot of function use it
- Case sensitive
- Don't use C compiler keywords such as (If, Else, For, etc)

Type of variable
================
- char - single byte
- int - two bytes
- flost - single precision floating point
- double - double precison floatng point
- typedef - create other data type name

You might also like