Introduction to turbo c

Preview:

DESCRIPTION

For computer LT 4th quarter

Citation preview

Powerpoint TemplatesARVINsantosbuendia

Powerpoint Templates

OBJECTIVES

Powerpoint Templates

INTRODUCTION TO TURBO-C

Powerpoint Templates

INTRODUCTION TO TURBO-C

Powerpoint Templates

TURBO-C CODE STRUCTURECOMMENTS

PREPROCESSOR DIRECTIVE

BEGIN BLOCK OF main( ) FUNCTION

END BLOCK OF main( ) FUNCTION

VARIABLE DECLARATION

FUNCTION NAME

BODY OF THE PROGRAM

Hello Arvin_ _Hello SUPERMAN

_

Powerpoint Templates

SCREEN OUTPUT FUNCTION

printf( ); – is used to write information on the screenprintf(<format string>);<format string> is a string that begins and ends with double quotes “”printf(“ARVIN santos BUENDIA”);

ARVIN santos BUENDIA_ _

Powerpoint Templates

SCREEN OUTPUT FUNCTIONAn ESCAPE SEQUENCE that starts

with the escape code “\”The backslash indicates that the characters that will follow is NOT TO BE PROCESS in the ORDINARY WAY ESCAPE SEQUENCE\n new line\t tab\” double quote\\ backslash

Powerpoint Templates

SCREEN OUTPUT FUNCTIONprintf(“arvin \

nSUPERMAN”);arvin_ __SUPERMAN_

Powerpoint Templates

SCREEN OUTPUT FUNCTIONprintf(“arvin \n

SUPERMAN”);arvin_ __SUPERMAN__

Powerpoint Templates

SCREEN OUTPUT FUNCTIONprintf(“arvin \

tSUPERMAN”);arvin_ _ SUPERMAN__

Powerpoint Templates

SCREEN OUTPUT FUNCTIONprintf(“arvin “

SUPERMAN”);

arvin_ _

START OF THE FORMAT STRING

END OF THE FORMAT STRING

SYNTAX ERROR NEXT CODE

Powerpoint Templates

ESCAPE SEQUENCESTART OF THE FORMAT

STRING

SCREEN OUTPUT FUNCTIONprintf(“arvin \"

SUPERMAN”);

arvin_ _“SUPERMAN_END OF THE FORMAT STRING

NEXT CODE

Powerpoint Templates

ESCAPE SEQUENCESTART OF THE FORMAT

STRING

SCREEN OUTPUT FUNCTIONprintf(“arvin \\

SUPERMAN”);

arvin_ _\SUPERMAN_END OF THE FORMAT STRING

NEXT CODE

Powerpoint Templates

ASSESSMENTprintf(“\\di nga ako nagpaputok\n\n”);printf(“nun \nbagong taon… \nbaket\n???”);printf(“\nkasi\t sumasabog na ang \”puso ko\” sa’yo”);

\ di nga ako nagpaputok_ ___nun __bagong taon… __baket__???__kasi_ _sumasabog na ang _“puso ko_“ _sa’yo_