C Programming Tutorial

 

Variables

In order for Computer Processor to read what we type on the keyboard and display it on the computer screen, the processor need a memory called variables to store the character that we type and display it on the computer screen.

For example:
 

int p;


This line of C code means, "I want to create a space called p that is able to hold a variable of type integer." A variable has a name (in this case, p) and a type (in this case, int, an integer). You can store a value in p by writing the ‘=’ operator (called assignment operator):

p = 5;

This mean p holding a value 5 in it now.
To make use of the value inside variable p, we can type something like:

printf("%d", p);


This mean value 5 will be displayed on the computer screen. In C, there are several standard types for variables:


int - integer (whole number) values e.g 1,10,40,30
float - floating point values e.g 1.1,3.33,2.65
char - single character values (such as "k" or "Q")

float p;
p=3.123   
printf("%f", p);


char p;
p=k   
printf("%c", p);

 

Microcontroller

What is a Microcontroller?

Microcontroller Specification

Programming PIC16F877A

Playing with a C Programming and PIC16F877A

Creating a Digital Clock using PIC16F877A, LCD and DS1337 Clock IC from Dallas

How to Load Hex File into PIC16F877A

 

Articles :

Lightning Surge Testing

Bit Error Rate Testing

Insertion Loss Testing

 

Light Emitting Diode

DC Power Jack

Voltage Regulator and Diode

Transistor and Operational Amplifier

Trimmer Pot, Relay and PCB

 

Understanding PIC16F877A

Product Development Using PIC16F877A

More Product Development Using PIC16F877A

PIC16F877A Input Output Overview

Interfacing PIC16F877A With LCD

 

VoIP Basic

VoIP Phone

Using VoIP Through Normal PSTN Telephone

What is Codec?

 

C Programming Tutorial

Introduction

What is C programming language?

The First C Program

The First C Program - Explanation

Variables

Printf

Reading User Values

Scanf

Looping

Using FOR loop

Arrays

More on Arrays

Example Program that use Arrays to Compare 6 PIN number

If, Else If, Else

Functions

Pointers

Summary

 

 

 

 

 

 

 

 

 

 

 

Copyright www.electronics.netmyne.com.