1 / 15

C Programming

C Programming. Computer Programming. process of designing, writing, testing , debugging , and maintaining the source code of computer programs… to create a set of instructions that computers use to perform specific operations or to exhibit desired behaviors…. Programming Language.

lucas
Download Presentation

C Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C Programming

  2. Computer Programming • process of designing, writing, testing , debugging , and maintaining the source code of computer programs… • to create a set of instructions that computers use to perform specific operations or to exhibit desired behaviors…

  3. Programming Language • Artificial languagedesigned to communicate instructions to a machine, particularly a computer… • to create programsthat control the behavior of a machine and/or to express algorithmsprecisely…

  4. Basic Computer Architecture

  5. Basic Structure of C Programs

  6. Compilation and Execution…

  7. Comments • Why to use comments…??? • Single Line comments : // type your comment here… • Multiline comments : between /* and */

  8. “Hello World…!!!” /* This is your First program…!!! “Hello World…!!!” */ #include<stdio.h>int main(){printf("Hello World\n"); // to print the characters…   return 0;}

  9. Escape Sequence • Escape Sequences (series of characters) “\t” and “\n”

  10. Today's Task 1. “Hello World…!!!” Program Use comments… Compile with –Wall option…

  11. Today’s Task 2. Write a C Program to print your name in the given format : • Use printf() function to print the characters… • Use \n, \t and spaces to format your name…

  12. Today’s Task

  13. Today’s Task • #include<stdio.h>void main () {printf("\n\n");printf("gggggg\n");printf("g g\n");printf("g \n");printf("gggg\n");printf("g g\n");printf("gggggg\n");printf("\n\n");}

  14. Today’s Task • 3. Write a C Program to print the following line : \n and \t are the examples of escape sequences…!

  15. Documentation • /****************************************************** Title :* Roll Number : * Description : * How to Compile :gccHelloWorld.c –Wall -o HelloWorld • * Date : *****************************************************/

More Related