• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
C Prog. -  ASCII Values, Break, Continue
 

C Prog. - ASCII Values, Break, Continue

on

  • 1,095 views

 

Statistics

Views

Total Views
1,095
Views on SlideShare
1,095
Embed Views
0

Actions

Likes
1
Downloads
41
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    C Prog. -  ASCII Values, Break, Continue C Prog. - ASCII Values, Break, Continue Presentation Transcript

    • C Programming –ASCII Values, Break, Continue statement Organized By: Vinay Arora Assistant Professor, CSED Thapar University, Patiala
    • ASCII Vinay Arora CSED
    • Data Types (C Program) #include<stdio.h> #include<conio.h> void main() { int a=2; short int b=2; long c=3; long int d=3; unsigned long x=10; unsigned short int y=20; char d1=A; unsigned char d2=B; float m=2.25; double n=6.67; clrscr(); Vinay Arora CSED
    • Data Types (C Program) contd. printf("For int and Short Int %d t %i",a,b); printf("nFor long and long Int %ld t %ld",c,d); printf("nFor unsigned long and unsigned short Int %u t %u",x,y); printf("nFor char and unsigned char %c %d t %c %d",d1,d1,d2,d2); printf("nFor float and double %f t %lf",x,y); getch(); } Vinay Arora CSED
    • Data Types (C Program) Output Vinay Arora CSED
    • Data Types in C Vinay Arora CSED
    • More on data types (C Program) #include<stdio.h> #include<conio.h> void main() { int a=2; float x=4.0000; clrscr(); printf("%5d",a); printf("n"); printf("%1.3f",x); getch(); } Vinay Arora CSED
    • More on data types (C Program) Output Vinay Arora CSED
    • Break Statement #include<stdio.h> #include<conio.h> void main( ) { int i = 1; clrscr(); for(i=1;i<=5;i++) { if(i==3) break; printf("%dn",i); } getch(); } Vinay Arora CSED
    • Break Statement (output) Vinay Arora CSED
    • Break Statement #include<stdio.h> #include<conio.h> void main( ) { int j=1; clrscr(); while (j<=10) { if (j==5) break; else printf ("%dn",j); j++; } getch(); } Vinay Arora CSED
    • Break Statement (output) Vinay Arora CSED
    • Continue Statement #include<stdio.h> #include<conio.h> void main( ) { int i = 1; clrscr(); for(i=1;i<=5;i++) { if(i==3) continue; printf("%dn",i); } getch(); } Vinay Arora CSED
    • Continue Statement (output) Vinay Arora CSED
    • Thnx… Vinay Arora CSED