Fundamentals of C Programming / C Language



#include <stdio.h> #include <conio.h>

main ( )

{

int a=15; int b;

scanf(“%d”,&b);

printf (“This is C Language”); printf (“%d”,a); print(“%d”,b);

getche( );

}

FORMAT SPECIFIER:

Format Specifier should be same to the type of variable for printing.

%cSingle Character

 

%sString
%dSinged Decimal Integer
%fFloating Point
%eFloating Point (Exponential Notation)
%gFloating Point (%f or %e)
%uUnsigned Decimal Integer

FIELD WIDTH SPECIFIRER or ESCAPE SEQUENCES:

  • Special characters are used to control printing on the output device are called Escape Sequence.
  • Escape Sequence is a combination of a Backslash ‘\’ and a code character.

 

\nFor New Line
\tFor Tab
\bFor Backspace
\aFor Alarm (Beep)
\rCursor will move to the beginning of line
\’To Print Single Quote
\”To Print Double Quote

\\ To Print Backslash

OPERATORS

Expression:

  • Expression is used for calculating the value of a formula.
  • It has different Operands and Operators.
  • Its evaluation gives a single value.

(e.g.)         A × B × C

– Where A, B, C are variable names and are called operands.

–  Multiplication sign ‘×’ is called operator.

Arithmetic Operators:

About Saweel Ur Raheem

Check Also

MCSE Notes Lecture # 4 : Applying Security to Folders

LECTURE 4 APPLYING SECURITY ON FOLDERS: Open Folder Options. Go to View Tag and uncheck ...

© Copyrights 2014. All rights are reserved www.latestcontents.com