Code -> Build -> Run

Slides:



Advertisements
Similar presentations
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Advertisements

Introduction to Programming Lecture 39. Copy Constructor.
Sample Test 1 Question. A pattern of binary digits can be interpreted in several different ways. Show how the pattern translates using each of.
Programming In C++ Spring Semester 2013 Lecture 2 Programming In C++, Lecture 2.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
CS1061 C Programming Lecture 4: Indentifiers and Integers A.O’Riordan, 2004.
Lecture No: 16. The scanf() function In C programming language, the scanf() function is used to read information from standard input device (keyboard).
A Variable is symbolic name that can be given different values. Variables are stored in particular places in the computer ‘s memory. When a variable is.
The C Character Set: The Characters used to form words, numbers and Expression depends upon the computer on which program runs. Letters. Digits White spaces.
C Tokens Identifiers Keywords Constants Operators Special symbols.
C-Language Keywords(C99)
CS1 Lesson 2 Introduction to C++ CS1 Lesson 2 -- John Cole1.
C Programming Laboratory I. Introduction to C Language /* the first program for user */ #include int a=0; int main(void) { printf(“Hello World\n”); return.
Characters and tokens Characters are the basic building blocks in C program, equivalent to ‘letters’ in English language Includes every printable character.
CSCI 130 Chapter 3. Variables & Names Variable Declarations: –reserve a storage location in memory –identify the name of the variable –identify the type.
Introduction to Programming
CS115 FALL Senem KUMOVA-METİN1 The Fundamental Data Types CHAPTER 3.
C++ Basics Tutorial 5 Constants. Topics Covered Literal Constants Defined Constants Declared Constants.
Slides created by: Professor Ian G. Harris Hello World #include main() { printf(“Hello, world.\n”); }  #include is a compiler directive to include (concatenate)
Lab 4 - Variables. Information Hiding General Principle: – Restrict the access to variables and methods as much as possible Can label instance variables.
Programming Fundamentals. Summary of previous lectures Programming Language Phases of C++ Environment Variables and Data Types.
Chapter2 Constants, Variables, and Data Types. 2.1 Introduction In this chapter, we will discuss –constants (integer, real, character, string, enum),symbolic.
1.2 Primitive Data Types and Variables
Sample Test 1 Question This one includes ASCII.. Sample Test 1 Question Show how the pattern translates using each of the following interpretations.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
C is a high level language (HLL)
Basic Data Types อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 4.
Chapter 1 slides1 What is C? A high-level language that is extremely useful for engineering computations. A computer language that has endured for almost.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
1 ENERGY 211 / CME 211 Lecture 3 September 26, 2008.
Overview Working directly with memory locations is beneficial. In C, pointers allow you to: change values passed as arguments to functions work directly.
C++ Lesson 1.
CSE 220 – C Programming Bitwise Operators.
A bit of C programming Lecture 3 Uli Raich.
ECE Application Programming
ECE Application Programming
LESSON 3 IO, Variables and Operators
Input/output.
TMF1414 Introduction to Programming
EPSII 59:006 Spring 2004.
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
C Short Overview Lembit Jürimägi.
Chapter 2: Introduction to C++
Chapter 2 - Data Types and Storage Classes
Visit for more Learning Resources
Programming in Perl Introduction
Introduction to CS Your First C Programs
פרטים נוספים בסילבוס של הקורס
Dynamic Memory Allocation
פרטים נוספים בסילבוס של הקורס
Chapter 2 Variables.
Govt. Polytechnic,Dhangar
Introduction C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell.
Default Arguments.
Variables in C Declaring , Naming, and Using Variables.
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
Programming Language C Language.
In C Programming Language
EECE.2160 ECE Application Programming
C Data Types and Variable
Module 2 Variables, Data Types and Arithmetic
EECE.2160 ECE Application Programming
Course Outcomes of Programming In C (PIC) (17212, C203):
C Programming Lecture-3 Keywords, Datatypes, Constants & Variables
Variables and Constants
Data in a C++ Program Numeric data and character data
Getting Started With Coding
ECE 120 Midterm 1 HKN Review Session.
Presentation transcript:

Code -> Build -> Run stdio.lib 01010101010101 void printf(string s) { <output to console> s } file.c #include<stdio.h> int main() { printf(“hello world!”) } Linker Compile file.obj 01010101010101 Compiler o/p Link stdio.h void sprintf (string, string); void printf(string); : File.exe

Data Types, Variables, and Data Output Data Types – type of data (character, integer, decimal etc.) char, short, int, long, float, double, long double, unsigned – char, short, int, long. Variable Has a name Has a fixed memory size allocated to based on its data type It can be assigned a value, interpreted based on its data type Assigning values to variables decimal notation (default) Octal (begin by zero) Hexadecimal (begin by 0x) int a = 10.9 const keyword

A day in Variable’s life Memory Stack of Process { int i; i = 58; int j = 30; int k = i + j; } : 0x239AB78 i 0x292E3FA 58 302829902 : 0x402ACE3 k 0x402ADF6 0x292E3FA 88 0x403ACE3 0x502ACEE : j 0x402ACE3 30 0x502A559 0x639AFC9 :