Data structure and c K.S. Prabhu Letterer All Deaf Educational Technology.

Slides:



Advertisements
Similar presentations
C++ Basics March 10th. A C++ program //if necessary include headers //#include void main() { //variable declaration //read values input from user //computation.
Advertisements

Sort the given string, without using string handling functions.
 2005 Pearson Education, Inc. All rights reserved Introduction.
1 Chapter 2 Introduction to Java Applications Introduction Java application programming Display ____________________ Obtain information from the.
Dale/Weems/Headington
CSE1301 Computer Programming Lecture 4: C Primitives I.
Software Development Method. Assignments Due – Homework 0, Warmup Reading – Chapter 2 –
C Programming Language 4 Developed in 1972 by Dennis Ritchie at AT&T Bell Laboratories 4 Used to rewrite the UNIX operating system 4 Widely used on UNIX.
C. About the Crash Course Cover sufficient C for simple programs: variables and statements control functions arrays and strings pointers Slides and captured.
1 ICS103 Programming in C Lecture 2: Introduction to C (1)
1 CIS Jan Overview Evolution of C++ Programming Style Syntax & Semantics Comments & White Space Data Types Variables & Declarations cout.
Introduction to C language
Programming in C Spring Semester 2013Programming and Data Structure1.
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
Copyrights© 2008 BVU Amplify DITM Software Engineering & Case Tools Page:1 INTRODUCTION TO ‘C’ LANGUAGE Chapter 2.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
1. Reference  2  Algorithm :- Outline the essence of a computational procedure, step by step instructions.  Program :- an.
Introduction of C++ language. C++ Predecessors Early high level languages or programming languages were written to address a particular kind of computing.
Reading the data from the input devices and displaying the results on the screen are the two main tasks of any program. To perform these tasks user friendly.
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.
Programming I Introduction Introduction The only way to learn a new programming language is by writing programs in it. The first program to.
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
Computer Science 101 Introduction to Programming.
1 C++ Syntax and Semantics, and the Program Development Process.
Constants Numeric Constants Integer Constants Floating Point Constants Character Constants Expressions Arithmetic Operators Assignment Operators Relational.
 Pearson Education, Inc. All rights reserved Introduction to Java Applications.
Fundamental Programming: Fundamental Programming Introduction to C++
Course Title: Object Oriented Programming with C++ instructor ADEEL ANJUM Chapter No: 03 Conditional statement 1 BY ADEEL ANJUM (MSc-cs, CCNA,WEB DEVELOPER)
Characters. Character Data char data type – Represents one character – char literals indicated with ' '
Introduction to Programming
1 Chapter 2 C++ Syntax and Semantics, and the Program Development Process.
Data Structure and c K.S.Prabhu Lecturer All Deaf Educational Technology.
CSCI 3133 Programming with C Instructor: Bindra Shrestha University of Houston – Clear Lake.
Course Title Object Oriented Programming with C++ instructor ADEEL ANJUM Chapter No: 06 FUNCTIONS 1 BY ADEEL ANJUM (MSc-cs, CCNA,WEB DEVELOPER) 1.
Strings program. C Program to Check if a given String is Palindrome #include void main() { char string[25], reverse_string[25] = {'\0'}; int i, length.
Strings program. C Program to Check if a given String is Palindrome #include void main() { char string[25], reverse_string[25] = {'\0'}; int i, length.
CHAPTER 2 PROBLEM SOLVING USING C++ 1 C++ Programming PEG200/Saidatul Rahah.
S CCS 200: I NTRODUCTION AND G ETTING S TART IN C P ROGRAMMING Lect. Napat Amphaiphan.
Functions Structured Programming. Topics to be covered Introduction to Functions Defining a function Calling a function Arguments, local variables and.
C BASICS QUIZ (DATA TYPES & OPERATORS). C language has been developed by (1) Ken Thompson (2) Dennis Ritchie (3) Peter Norton (4) Martin Richards.
POINTERS IN C Pointer Basics, Pointer Arithmetic, Pointer to arrays and Pointer in functions.
Department of Electronic & Electrical Engineering Lecture 3 IO reading and writing variables scanf printf format strings "%d %c %f" Expressions operators.
C Building Block Chapter 2. Variables A variable is a space in the computer’s memory set aside for a certain kind of data and given a name for easy reference.
Functions The fruitful & parameterized functions.
A Sample Program #include using namespace std; int main(void) { cout
BASIC C PROGRAMMING LANGUAGE TUTORIAL infobizzs.com.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
Introduction to C Programming I Subject: T0016 – ALGORITHM AND PROGRAMMING Year: 2013.
From Algorithms to Programs Both are sets of instructions on how to do a task Algorithm: –talking to humans, easy to understand –in plain (English) language.
FUNCTION Functions is a sub-program that contains one or more statements and it performs some task when called.
Chapter 1 Introduction.
LESSON 3 IO, Variables and Operators
C Language VIVA Questions with Answers
ECE Application Programming
Introduction to C Programming Language
' C ' PROGRAMMING SRM-MCA.
Visit for more Learning Resources
Formatted and Unformatted Input/Output Functions
Introduction to the C Language
Introduction to C++ Programming
Govt. Polytechnic,Dhangar
C ( Programming Language ) PSK Technologies By: Arti Sontakke An ISO 9001:2015 (QMS) Certified IT Company Computer Education | Software Development | Computer.
The C Language: Intro.
Character Arrays char string1[] = “first”;
C – Programming Language
DATA TYPES There are four basic data types associated with variables:
Course Outcomes of Programming In C (PIC) (17212, C203):
Presentation transcript:

Data structure and c K.S. Prabhu Letterer All Deaf Educational Technology

Introduction in c C program made by ken Thompson and Dennis Ritchie in Developed by martin Richards. Although C was designed for implementing System Software. It is also widely used for developing portable Application Software.

ken Thompson and Dennis Ritchie

Means C program mean compiler programming C is a Program language. It is a middle level language This programming language is designed to help as Data process. Data process is numbers, characters and strings. Its provide use of output display

C Program logo and Code

The Character Set in C 1)Upper case alphabets: It is capital word alphabets Example: A B C D E …….Z

Sample code Program #include power(int*m,int*n); void main() { int X,Y; clrscr(); printf("Enter number:"); scanf("%d",&X); fflush(stdin); printf("Enter power to raise to:"); scanf("%d",&Y); fflush(stdin); power(&X,&Y); …………….. ……………… ………………. getch();

2) Lower case alphabets: It is small word through called by lower case alphabets Example: a b c d e……..z

Sample Code Program #include power(int*m,int*n); void main() { int x,y; clrscr(); printf("Enter number:"); scanf("%d",&x); fflush(stdin); printf("Enter power to raise to:"); scanf("%d",&y); fflush(stdin); power(&x,&y); …………….. ……………… ………………. getch(); }

3) Numbered or digital characters: It means also used by number or Ditital characters. Example:

Sample code Program #include void main() { int a,b; char cmd[25]; ………. } #include void main() { char name[21],addrs[31]; clrscr(); puts("Enter your Name to a maximum of 20 characters"); puts("Enter your Address to a maximum of 30 characters"); …… }

4) Arithmetic Operators: It means arithmetic program through operated by arithmetic operators. Example: +, %, *, - Plus,Division,Multiple and Minus

Sample Code Program #include sum(int a,int b); void main() { int x,y,value; scanf("%d%d",&x,&y); value=sum(x,y); printf("Total is %d\n",value); } sum(int a,int b) { return a+b; } OUTPUT Output:: 5 3 Total is 8

5) Relational Operators: It is numberic and case character relation operated by relational operators. Syntax:-,, =, = Less and Great, Less Equal Great,Equal Example Example: 4>5,6<4,4=4

Sample Code Program #include void main() { int I,sum,num; clrscr(); sum=num=0; for(I=0;I<8;I=I+1) { …….. if(num<=0) getch(); }

6) curly brace: Syntax:- { } { → Starting curely space } → Ending curely space Example: {……………………}

Sample Code Program {  Head of curly ………….. {  Sub of curly ………….. }  Sub End of curly ………. getch(); }  Head End of Curly

7) Square braces: Syntax:- [ ] Example: Float [4] ; String [9] ;

Sample Code program #include void main() { char str1[101],str2[101]; int diff,I=0; clrscr(); ……….. getch(); }

8) Parenthèses braces :- Syntax:- ( ) Example: Print (………) Scant (………)

Sample Code program Program:: #include void main() { char in_str[21]; clrscr(); puts("Enter a string to a maximum of 20 characters"); gets(in_str); fflush(stdin); puts(in_str); getch(); }

9)Special characters: It mean other syntax characters Syntax:- &, !, #, ?, ~, ^, $, |,:,;.

Sample code program #include void main() { char yn; clrscr(); do { puts("enter y/n(yes/no)"); yn=getchar(); fflush(stdin); if(yn!='y'&&yn!='n') puts("invalid input"); } while(yn!='y'&&yn!='n'); getch(); }

Special Character: