Skip to main content

BASICS OF C

Basics of C.
C language consists of datatypes, variables and constants.
Datatypes are those which hold some values during the execution of program. 
For eg. int . int is the datatype which can hold integer values.
Float . it is the datatype which hold the fractional value.
Char is the datatype which can hold the characters.
.
And the most important thing is C is a case sensitive language.
int and Int both have different meanings.
some examples of datatype are .
here is a little illustration of such datatype in C program.
#include<stdio.h>
void main()
{ int a=1;
float b=0.0f;
char c='a';
printf("%d%f%c", a,b,c);
} 
At the top these are header files which contain function printf which is being used in this program.
 The out of the program will be 10.0a.
 

Comments

Popular posts from this blog

Basics of python

Chapter 1 – Python Basics Read the author's other free Python books: Python Basics Lesson 2 - Expressions, Data Types, & Variables The Python programming language has a wide range of syntactical constructions, standard library functions, and interactive development environment features. Fortunately, you can ignore most of that; you just need to learn enough to write some handy little programs. You will, however, have to learn some basic programming concepts before you can do anything. Like a wizard-in-training, you might think these concepts seem arcane and tedious, but with some knowledge and practice, you’ll be able to command your computer like a magic wand to perform incredible feats. This chapter has a few examples that encourage you to type into the interactive shell, which lets you execute Python instructions one at a time and shows you the results instantly. Using the interactive shell is great for learning what ...

GETTING STARTED WITH C

Getting Started with C Welcome to the sixth edition of Sams Teach Yourself C in 21 Days! Today’s lesson starts you toward becoming a proficient C programmer. Today you will learn: • Why C is a great choice among programming languages • The steps in the program development cycle • How to write, compile, and run your first C program • About error messages generated by the compiler and linker A Brief History of the C Language Why Use C? In today’s world of computer programming, there are many high-level languages to choose from, such as C, Perl, BASIC, Java, and C#. These are all excellent languages suited for most programming tasks. Even so, there are several reasons why many computer professionals feel that C is at the top of the list: • C is a powerful and flexible language. What you can accomplish with C is limited only by your imagination. The language itself places no constraints on you. C is used for projects as diverse as operating systems, word processors, graphi...