GUJARAT KNOWLEDGE VILLAGE Faculty Name:- Prof H.M.Patel Students Name:- SONI VISHAL 130750109111 THAKKER BHAVIN 130750109112 ZALA JAYDIP 130750109124 ZALA.

Slides:



Advertisements
Similar presentations
Lecture 071 CS 192 Lecture 7 Winter 2003 December 15-16, 2003 Dr. Shafay Shamail.
Advertisements

Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 3: Primitive Data Types.
Announcements Quiz 1 Next Week. int : Integer Range of Typically -32,768 to 32,767 (machine and compiler dependent) float : Real Number (i.e., integer.
1 Chapter 3 Arithmetic Expressions. 2 Chapter 3 Topics l Overview of Java Data Types l Numeric Data Types l Declarations for Numeric Expressions l Simple.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Expressions and Operators Program Style.
Java Intro. Strings “This is a string.” –Enclosed in double quotes “This is “ + “another “ + “string” –+ concatenates strings “This is “ “ string”
More on Numerical Computation CS-2301 B-term More on Numerical Computation CS-2301, System Programming for Non-majors (Slides include materials from.
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?
ECE122 L3: Expression Evaluation February 6, 2007 ECE 122 Engineering Problem Solving with Java Lecture 3 Expression Evaluation and Program Interaction.
0 Chap. 2. Types, Operators, and Expressions 2.1Variable Names 2.2Data Types and Sizes 2.3Constants 2.4Declarations Imperative Programming, B. Hirsbrunner,
Expressions An expression is a sequence of operands and operators that reduces to a single value expression operator operand An operator is a language-specific.
Data Types, Expressions and Functions (part I)
1 Chapter Two Using Data. 2 Objectives Learn about variable types and how to declare variables Learn how to display variable values Learn about the integral.
Expressions, Data Conversion, and Input
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Outline Variables 1.
***** SWTJC STEM ***** Chapter 2-3 cg 29 Java Operators Recall Java’s programming components: Packages - Collection of classes (Programs) Classes - Collections.
Java Primitives The Smallest Building Blocks of the Language (corresponds with Chapter 2)
CHAPTER:8 OPERATORS AND EXPRESSION IN C++ Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
2440: 211 Interactive Web Programming Expressions & Operators.
CH2 – Using Data. Constant Something which cannot be changed Data Type Format and size of a data item Intrinsic Data Types Pg. 47 – Table 2-1 Basic ones.
CIS 260: App Dev I. 2 Programs and Programming n Program  A sequence of steps designed to accomplish a task n Program design  A detailed _____ for implementing.
Chapter 2: Using Data.
OPERATORS.
M.T.Stanhope Oct Title : C++ Basics Bolton Institute - Faculty of Technology (Engineering) 1 C++ Basics u Data types. u Variables and Constants.
Integer numerical data types. The integer data types The integer data types use the binary number system as encoding method There are a number of different.
Introduction to C Programming Chapter 2 : Data Input, Processing and Output.
CIS 260: App Dev I. 2 Programs and Programming n Program  A sequence of steps designed to accomplish a task n Program design  A detailed _____ for implementing.
C Programming Lecture 6 : Operators Lecture notes : courtesy of Ohio Supercomputing Center, and Prof. Woo and Prof. Chang.
C++ Basics Tutorial 6 Operators. What are going to see today? Assignment operator(=) Arithmetic operators(+,-,*,/,%) Compound assignment(+=,-=,*=……..)
Computer Engineering 1 st Semester Dr. Rabie A. Ramadan 3.
PHY-102 SAPVariables and OperatorsSlide 1 Variables and Operators In this section we will learn how about variables in Java and basic operations one can.
Chapter 6 Mathematical Operations. 6.1 Mathematical Expressions In mathematics this expression is valid 0 = -4y + 5 It is invalid in programming Left.
Java Language Basics By Keywords Keywords of Java are given below – abstract continue for new switch assert *** default goto * package.
COMP Primitive and Class Types Yi Hong May 14, 2015.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Programming in Java (COP 2250) Lecture 4 Chengyong Yang Fall, 2005.
PROGRAM ESSENTIALS. TOKENS  SMALLEST UNITS OF A PROGRAM LANGUAGE  Special Symbols  Mathematical Operators  Punctuation  Word Symbols  Key Words.
Module B - Computation1/61 Module-B-Computation Variables Basic Memory Operations Expressions.
Programming Fundamentals. The setw Manipulator setw changes the field width of output. The setw manipulator causes the number (or string) that follows.
0 Chap.2. Types, Operators, and Expressions 2.1Variable Names 2.2Data Types and Sizes 2.3Constants 2.4Declarations 2.5Arithmetic Operators 2.6Relational.
ECE 103 Engineering Programming Chapter 4 Operators Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material developed.
Programming Fundamentals. Summary of Previous Lectures Phases of C++ Environment Data Types cin and cout.
Unary, Binary, logical Operations, Explicit type conversion Lecture 6 Instructor: Haya Sammaneh.
C Language 1 Program Looping. C Language2 Topics Program looping Program looping Relational operators / expressions Relational operators / expressions.
Prepared By: K. U. Khimani Assistant Professor IT Department.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
ECE 103 Engineering Programming Chapter 4 Operators Herbert G. Mayer, PSU Status 6/10/2016 Initial content copied verbatim from ECE 103 material developed.
CompSci 230 S Programming Techniques
Arithmetic Expressions
CSE 220 – C Programming Expressions.
Lecture 3 Java Operators.
Chap. 2. Types, Operators, and Expressions
Nahla Abuel-ola / WIT.
INC 161 , CPE 100 Computer Programming
Data Conversion & Scanner Class
C Short Overview Lembit Jürimägi.
Type Conversion, Constants, and the String Object
Operators and Expressions
Character Set The character set of C represents alphabet, digit or any symbol used to represent information. Types Character Set Uppercase Alphabets A,
C++ fundamentals Lecture 1, Chapter 2 – pp /22/2018 Y K Choi.
C Operators, Operands, Expressions & Statements
Chapter-3 Operators.
Conversion Check your class notes and given examples at class.
elementary programming
Operators In Java Programming By Rajanikanth B.
Type Conversion It is a procedure of converting one data type values into another data type In C programming language we are having two types of type conversion.
OPERATORS AND EXPRESSIONS IN C++
DATA TYPES There are four basic data types associated with variables:
Expressions An Expression is a sequence of operands and operators that reduces to a single value. An operator is a language-specific syntactical token.
INTRODUCTION TO C.
Presentation transcript:

GUJARAT KNOWLEDGE VILLAGE Faculty Name:- Prof H.M.Patel Students Name:- SONI VISHAL THAKKER BHAVIN ZALA JAYDIP ZALA JAYDIP Subject:-CPU Branch:-EE

ALU CPU CU

 Every ‘C’ PROGRAM HAS TO FOLLOW SPECIFIC STRUCTURE..  ‘C’ program must have at least one function called as main(). o The main() function has control over the other part of the program.

Documentation Header files Constants and Global variables Void main() { Statement(s) } User defined functions and procedures with their body

TYPE SIZE RANGE OF VAL char 1 Bytes -128 to +127 int 2 Bytes to float 4 Bytes 3.4e-38 to 3.4e+38 double 8 Bytes 1.7e-308 to 1.7e+308

 1.) Numeric constants  2.) Non Numeric constants

 It is a number type of constants.  It can be Integer constant or real constant.  Integer constant can be positive and negative number.  This is a valid number.  15  -345  0  +7463

 These are the constants which is represent other than number.  They are two types.....  1.) Character constants  2.) String constants Character constants are single character and are enclosed in single quotes. ‘c’ ‘?’ ‘5’

 Arithmetic operators  Relational operators  Logical operators  Assignment operators  Increment and Decrement operators  Conditional operators  Bitwise operators  Other special operators

 Arithmetic operators are used to perform arithmetic operations.  OPERATORS NAME MEANING + Add - Subtract * Multiply % Divide

 Relational operators are used to compare variables or constants..  OPERATOR NAME MEANING == Equals != Not equal to > Greater than < Less than

 operator name meaning && Logical AND II Logical OR ! Logical NOT

operator name meaning a= a + 5; a +=5; a= a -5; a -=5; a= a *5; a *=5; a= a /5; a /=5; a= a %5; a %=5;

 ++ increment operators  -- decrement operators  If a is a variable,, then ++a is called prefix increment.  If ‘a’ is a variable,, then a++ is called postfix increment.

 The files includes at the beginning of ‘C’ program and having an extension.h are called as header files.  stdio.h standard input output functions.  conio.h console input output functions.  string.h string processing functions.  math.h mathematical functions  ctype.h character type checking functions.

 If the operands are of different type, then the operand with a lower type is upgraded to the higher type and then the operation is performed. * / % first priority + - second priority

 When user need the type conversion explicitly, then type casting is used.  Remember that type conversion is automatic while type casting is explicitly specific by the programmer in the program.  The type casting can be specified in followed form.  ( type name ) expression;

THANK YOU