C is a programming language developed in the 1970s that is commonly used to write system software and applications. It is efficient, flexible, and requires less memory than other languages. C++ builds on C by adding object-oriented features. Programming languages use looping and conditional statements like for, while, do-while, and switch-case to control program flow and repetition. These statements allow code to be executed repeatedly or conditionally based on expressions.
A computer program is a sequence of instructions that tells a computer to perform tasks. Programs are written by programmers in human-readable source code and then compiled into an executable form for the computer to run directly. Common programming languages include C++, Java, and Python. Switch-case statements allow programmers to write code that performs different actions depending on the value of a variable.
Fundamentals of programming final santosAbie Santos
This document discusses programming concepts like switch case statements, looping statements, and if-else statements. It provides examples of code and explanations of how to write and run different statements in C++. It also includes links to external websites that contain additional examples of programming concepts and how they appear when compiled and executed.
Switch case and looping statements are programming constructs that allow for conditional execution of code blocks. A switch case statement allows a variable's value to control program flow via multiple branches, improving clarity over long if statements. Looping statements like while and for loops execute a block of code repeatedly, allowing programs to perform repetitive tasks or process collections of data by running the same code multiple times. These programming structures are essential for many applications to make complex decisions and process large amounts of information.
Emscripten is a source-to-source compiler that takes C/C++ code and compiles it to browser-runnable JavaScript code. It works by first compiling the C/C++ code to LLVM IR code using clang/clang++, then using a LLVM backend called Fastcomp to generate the JavaScript output. The compiled code can then be run directly in the browser. Emscripten allows running large web applications, developing for multiple platforms, and porting performance critical libraries to the web. It enables debugging of compiled code directly in the browser developer tools.
This document is the first lesson of a C++ tutorial, providing an introduction to setting up a C++ compiler and environment, the basic structure of a C++ program, and some key elements like comments, headers, namespaces, functions, and input/output. It includes a simple "Hello World" program as an example to demonstrate these concepts. The tutorial is intended for both beginners and experienced programmers looking to learn or expand their skills in C++.
The document discusses source-to-source compilers. It defines a source-to-source compiler as a compiler that takes source code as input and produces source code as output, which can then be used as input for another compiler. Some key differences between regular compilers and source-to-source compilers are discussed. Examples of popular source-to-source compilers like ROSE, DMS, OpenMP, and Cetus are provided.
A transpiler is a type of compiler that takes source code from one programming language and outputs source code in another programming language, while a compiler converts source code directly into machine code. Transpilers allow code to be translated between languages at similar levels of abstraction, such as C++ to C, while compilers translate to a lower level like C to assembly code. Transpilers are useful for porting codebases to new languages, translating between language versions, or implementing domain-specific languages. Popular transpilers include Babel, TypeScript, and Emscripten.
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
Std 10 computer chapter 10 introduction to c language (part1) by Nuzhat Memon
Program and Characteristics of Program
Need of Programming Language
Need of Translator
History of C Language
Features of C Language
First Program in C Language
Structure of C Language (Documentation Section, Symbolic Constant Definition, File Include Section, Global Variable or Declaration Section, Main Function, User Defined Function)
Execution of C Program (Source code, Compiler, Object code, Linker, Executable code, Loader)
A computer program is a sequence of instructions that tells a computer to perform tasks. Programs are written by programmers in human-readable source code and then compiled into an executable form for the computer to run directly. Common programming languages include C++, Java, and Python. Switch-case statements allow programmers to write code that performs different actions depending on the value of a variable.
Fundamentals of programming final santosAbie Santos
This document discusses programming concepts like switch case statements, looping statements, and if-else statements. It provides examples of code and explanations of how to write and run different statements in C++. It also includes links to external websites that contain additional examples of programming concepts and how they appear when compiled and executed.
Switch case and looping statements are programming constructs that allow for conditional execution of code blocks. A switch case statement allows a variable's value to control program flow via multiple branches, improving clarity over long if statements. Looping statements like while and for loops execute a block of code repeatedly, allowing programs to perform repetitive tasks or process collections of data by running the same code multiple times. These programming structures are essential for many applications to make complex decisions and process large amounts of information.
Emscripten is a source-to-source compiler that takes C/C++ code and compiles it to browser-runnable JavaScript code. It works by first compiling the C/C++ code to LLVM IR code using clang/clang++, then using a LLVM backend called Fastcomp to generate the JavaScript output. The compiled code can then be run directly in the browser. Emscripten allows running large web applications, developing for multiple platforms, and porting performance critical libraries to the web. It enables debugging of compiled code directly in the browser developer tools.
This document is the first lesson of a C++ tutorial, providing an introduction to setting up a C++ compiler and environment, the basic structure of a C++ program, and some key elements like comments, headers, namespaces, functions, and input/output. It includes a simple "Hello World" program as an example to demonstrate these concepts. The tutorial is intended for both beginners and experienced programmers looking to learn or expand their skills in C++.
The document discusses source-to-source compilers. It defines a source-to-source compiler as a compiler that takes source code as input and produces source code as output, which can then be used as input for another compiler. Some key differences between regular compilers and source-to-source compilers are discussed. Examples of popular source-to-source compilers like ROSE, DMS, OpenMP, and Cetus are provided.
A transpiler is a type of compiler that takes source code from one programming language and outputs source code in another programming language, while a compiler converts source code directly into machine code. Transpilers allow code to be translated between languages at similar levels of abstraction, such as C++ to C, while compilers translate to a lower level like C to assembly code. Transpilers are useful for porting codebases to new languages, translating between language versions, or implementing domain-specific languages. Popular transpilers include Babel, TypeScript, and Emscripten.
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
Std 10 computer chapter 10 introduction to c language (part1) by Nuzhat Memon
Program and Characteristics of Program
Need of Programming Language
Need of Translator
History of C Language
Features of C Language
First Program in C Language
Structure of C Language (Documentation Section, Symbolic Constant Definition, File Include Section, Global Variable or Declaration Section, Main Function, User Defined Function)
Execution of C Program (Source code, Compiler, Object code, Linker, Executable code, Loader)
C is an older procedural language that does not support object-oriented programming. C++ adds object-oriented features to C but remains a lower-level language. C# is a higher-level, fully object-oriented language that is easier to use for web and client application development compared to C/C++ due to features like garbage collection and a robust standard library. While C/C++ give more control, their complexity and lack of memory management can make them more difficult for development compared to the managed memory and well-defined behavior of C#.
Want to know how programming works? how it helps the human being with their everyday work? well you can easily find the answers to those questions that are in your minds. Programming, well it is a kind of software that can make games, applications, movies and a lot more. For a start, programming can help us students with our home works and such stuffs. and now, we can learn more about the different languages used in programming, program life cycle, rules and symbols used and its level. Let us discover how programming works!
This document provides an introduction to the Perl programming language. It begins with an overview of Perl, including what Perl is, its history and key features. It then discusses Perl syntax, variables types (scalars, arrays and hashes), and other important Perl concepts like variable scoping and context. The document also provides examples of basic Perl programs and commands.
This document provides notes on web programming unit 2 prepared by Bhavsingh Maloth. It discusses the history and objectives of JavaScript, defining it as a scripting language used to add interactivity to HTML pages. JavaScript can be divided into core, client-side, and server-side components. Core JavaScript is the basis of the language, while client-side JavaScript supports browser controls and user interactions. Server-side JavaScript makes the language useful on web servers. The document also provides examples of how to write text, insert scripts, and use variables in JavaScript.
The document discusses the basic structure of C programming, including preprocessor directives, main functions, data types for variables and constants, and input/output statements. It explains concepts like declaring and assigning values to variables, as well as defining constants. The document also provides examples of writing basic C code that demonstrates these fundamental programming elements.
An introduction on language processingRalf Laemmel
This document introduces language processing components for a simple imperative language called Pico. It describes the abstract syntax, concrete syntax, recognizer, parser, type checker, interpreter, assembly code generator, compiler, machine, flow charts, and visualizer implemented in Haskell. The language processors leverage parser combinators, natural semantics, and code generation approaches.
single pass compiler and its architecturenoor ul ain
This document discusses single pass compilers. A single pass compiler scans the source code once, immediately translating each part into machine code without intermediate code generation or optimization. The main stages are lexical analysis, syntactical analysis, and code generation. Single pass compilers are more efficient and use less memory than multi-pass compilers but cannot optimize code or support complex languages.
The document provides an introduction to the Python programming language. It discusses the history and overview of Python, including that it is an interpreted, interactive, and object-oriented scripting language. It then covers Python features such as being easy to learn and read, having a broad standard library, and being portable. The document also demonstrates basic Python concepts like data types, variables, conditional statements, and functions.
The document describes the unique features of the C++ and PHP programming languages. It discusses the history of C++, which was created by Bjarne Stroustrup in 1979 by adding object-oriented programming capabilities to the C language. Some key features of C++ include performance, low-level hardware interaction capabilities, powerful abstractions like generic code, and support for multiple programming paradigms like object-oriented, imperative, functional and logic programming. The document also provides examples of code written in C++ to illustrate various programming concepts.
The document argues that the distinction between source code and object code is a false dichotomy. It provides several examples to illustrate that:
1) Source and object code are relative terms, as the output of one program can be input to another. Programs typically undergo multiple transformations from higher to lower-level representations.
2) Even binary machine code can be read by humans with disassemblers, and interpreted languages can execute human-readable source code directly without compiling.
3) The boundaries between human-readable and executable code are blurred, as emulators and virtual machines allow otherwise non-executable code to run. All computer code ultimately expresses the same underlying algorithms and logic.
The document provides information about C programming language including its history, characteristics, features, program structure, control statements, preprocessor directives, header files, console I/O functions, and switch statements. C was developed by Dennis Ritchie at Bell Labs in 1972 and evolved from earlier languages like ALGOL, BCPL, and B. It is a structured, portable, and widely used language well-suited for system programming like operating systems and embedded systems.
This document provides an introduction to the C programming language. It discusses that C was created to develop the UNIX operating system and is widely used for systems programming. The document then covers C program structure, tokens, basic syntax, identifiers, keywords, whitespace, data types including integer and floating point types, variables, and variable scope and storage duration. It provides examples of declaring, defining, initializing and using different variables in a sample C program.
C++ and C# differ significantly in their underlying translation models, language features, and approaches to problem solving. When migrating from C++ to C#, programmers must understand these fundamental differences to develop effective, robust C# code. Key areas of difference include memory management, type systems, declarations versus definitions, and how primitive problems like stack implementation may be solved in object-oriented C# versus templates in C++.
This document provides an introduction and overview of the C programming language. It discusses that C was developed in the 1970s and is commonly used today. The document outlines key characteristics of C like its small size and support for structured programming. It also describes common uses of C like for systems programming and end-user applications. The structure of a basic C program is shown including the main function and other functions. The different files used in a C program like source code files and header files are defined. Finally, the document explains the process of compiling and executing C programs.
Turbo C is a high-level programming language integrated development environment (IDE) used to write and run C programs. The Turbo C IDE screen is divided into four parts - the main menu, editor, compiler message window, and hot key reference line. The main menu allows users to load, edit, compile and run C programs. Common functions used in C programs include input/output functions like printf() and getch(). The IDE provides features like syntax highlighting, auto-indentation, and debugging tools to aid in C program development.
Lets Go - An introduction to Google's Go Programming Language Ganesh Samarthyam
This document introduces the Go programming language, which was announced by Google in 2009. It summarizes Go's key features, including being a concurrent, garbage-collected systems programming language. It also provides instructions on installing Go and a simple "Hello World" program example. The document argues that Go has substantial features for systems programming in today's networked, multi-core world.
Go is a compiled, concurrent, garbage-collected, statically typed language developed at Google in 2007 to address issues with large software systems. It was created to facilitate easy memory management, enable rapid compilation, and handle concurrency through built-in goroutines and channels. Many large companies now use Go for its improved developer productivity compared to other languages.
Algorithm pseudocode flowchart program notesArghodeepPaul
The document discusses algorithms, pseudocode, flowcharts, and final programs. It defines an algorithm as a step-wise solution to a problem. Pseudocode is similar to a programming language and is based on an algorithm. A flowchart provides a graphical representation of an algorithm using standard symbols. Finally, the algorithm, pseudocode, and flowchart are encoded into an actual program using a programming language like C, Java, or Kotlin.
The document discusses programming concepts including programming languages, switch case statements, and looping. It provides examples of how to write code using switch case statements and different types of loops (for, while, do-while). The examples demonstrate how to get user input, perform calculations, and repeat blocks of code multiple times.
C is an older procedural language that does not support object-oriented programming. C++ adds object-oriented features to C but remains a lower-level language. C# is a higher-level, fully object-oriented language that is easier to use for web and client application development compared to C/C++ due to features like garbage collection and a robust standard library. While C/C++ give more control, their complexity and lack of memory management can make them more difficult for development compared to the managed memory and well-defined behavior of C#.
Want to know how programming works? how it helps the human being with their everyday work? well you can easily find the answers to those questions that are in your minds. Programming, well it is a kind of software that can make games, applications, movies and a lot more. For a start, programming can help us students with our home works and such stuffs. and now, we can learn more about the different languages used in programming, program life cycle, rules and symbols used and its level. Let us discover how programming works!
This document provides an introduction to the Perl programming language. It begins with an overview of Perl, including what Perl is, its history and key features. It then discusses Perl syntax, variables types (scalars, arrays and hashes), and other important Perl concepts like variable scoping and context. The document also provides examples of basic Perl programs and commands.
This document provides notes on web programming unit 2 prepared by Bhavsingh Maloth. It discusses the history and objectives of JavaScript, defining it as a scripting language used to add interactivity to HTML pages. JavaScript can be divided into core, client-side, and server-side components. Core JavaScript is the basis of the language, while client-side JavaScript supports browser controls and user interactions. Server-side JavaScript makes the language useful on web servers. The document also provides examples of how to write text, insert scripts, and use variables in JavaScript.
The document discusses the basic structure of C programming, including preprocessor directives, main functions, data types for variables and constants, and input/output statements. It explains concepts like declaring and assigning values to variables, as well as defining constants. The document also provides examples of writing basic C code that demonstrates these fundamental programming elements.
An introduction on language processingRalf Laemmel
This document introduces language processing components for a simple imperative language called Pico. It describes the abstract syntax, concrete syntax, recognizer, parser, type checker, interpreter, assembly code generator, compiler, machine, flow charts, and visualizer implemented in Haskell. The language processors leverage parser combinators, natural semantics, and code generation approaches.
single pass compiler and its architecturenoor ul ain
This document discusses single pass compilers. A single pass compiler scans the source code once, immediately translating each part into machine code without intermediate code generation or optimization. The main stages are lexical analysis, syntactical analysis, and code generation. Single pass compilers are more efficient and use less memory than multi-pass compilers but cannot optimize code or support complex languages.
The document provides an introduction to the Python programming language. It discusses the history and overview of Python, including that it is an interpreted, interactive, and object-oriented scripting language. It then covers Python features such as being easy to learn and read, having a broad standard library, and being portable. The document also demonstrates basic Python concepts like data types, variables, conditional statements, and functions.
The document describes the unique features of the C++ and PHP programming languages. It discusses the history of C++, which was created by Bjarne Stroustrup in 1979 by adding object-oriented programming capabilities to the C language. Some key features of C++ include performance, low-level hardware interaction capabilities, powerful abstractions like generic code, and support for multiple programming paradigms like object-oriented, imperative, functional and logic programming. The document also provides examples of code written in C++ to illustrate various programming concepts.
The document argues that the distinction between source code and object code is a false dichotomy. It provides several examples to illustrate that:
1) Source and object code are relative terms, as the output of one program can be input to another. Programs typically undergo multiple transformations from higher to lower-level representations.
2) Even binary machine code can be read by humans with disassemblers, and interpreted languages can execute human-readable source code directly without compiling.
3) The boundaries between human-readable and executable code are blurred, as emulators and virtual machines allow otherwise non-executable code to run. All computer code ultimately expresses the same underlying algorithms and logic.
The document provides information about C programming language including its history, characteristics, features, program structure, control statements, preprocessor directives, header files, console I/O functions, and switch statements. C was developed by Dennis Ritchie at Bell Labs in 1972 and evolved from earlier languages like ALGOL, BCPL, and B. It is a structured, portable, and widely used language well-suited for system programming like operating systems and embedded systems.
This document provides an introduction to the C programming language. It discusses that C was created to develop the UNIX operating system and is widely used for systems programming. The document then covers C program structure, tokens, basic syntax, identifiers, keywords, whitespace, data types including integer and floating point types, variables, and variable scope and storage duration. It provides examples of declaring, defining, initializing and using different variables in a sample C program.
C++ and C# differ significantly in their underlying translation models, language features, and approaches to problem solving. When migrating from C++ to C#, programmers must understand these fundamental differences to develop effective, robust C# code. Key areas of difference include memory management, type systems, declarations versus definitions, and how primitive problems like stack implementation may be solved in object-oriented C# versus templates in C++.
This document provides an introduction and overview of the C programming language. It discusses that C was developed in the 1970s and is commonly used today. The document outlines key characteristics of C like its small size and support for structured programming. It also describes common uses of C like for systems programming and end-user applications. The structure of a basic C program is shown including the main function and other functions. The different files used in a C program like source code files and header files are defined. Finally, the document explains the process of compiling and executing C programs.
Turbo C is a high-level programming language integrated development environment (IDE) used to write and run C programs. The Turbo C IDE screen is divided into four parts - the main menu, editor, compiler message window, and hot key reference line. The main menu allows users to load, edit, compile and run C programs. Common functions used in C programs include input/output functions like printf() and getch(). The IDE provides features like syntax highlighting, auto-indentation, and debugging tools to aid in C program development.
Lets Go - An introduction to Google's Go Programming Language Ganesh Samarthyam
This document introduces the Go programming language, which was announced by Google in 2009. It summarizes Go's key features, including being a concurrent, garbage-collected systems programming language. It also provides instructions on installing Go and a simple "Hello World" program example. The document argues that Go has substantial features for systems programming in today's networked, multi-core world.
Go is a compiled, concurrent, garbage-collected, statically typed language developed at Google in 2007 to address issues with large software systems. It was created to facilitate easy memory management, enable rapid compilation, and handle concurrency through built-in goroutines and channels. Many large companies now use Go for its improved developer productivity compared to other languages.
Algorithm pseudocode flowchart program notesArghodeepPaul
The document discusses algorithms, pseudocode, flowcharts, and final programs. It defines an algorithm as a step-wise solution to a problem. Pseudocode is similar to a programming language and is based on an algorithm. A flowchart provides a graphical representation of an algorithm using standard symbols. Finally, the algorithm, pseudocode, and flowchart are encoded into an actual program using a programming language like C, Java, or Kotlin.
The document discusses programming concepts including programming languages, switch case statements, and looping. It provides examples of how to write code using switch case statements and different types of loops (for, while, do-while). The examples demonstrate how to get user input, perform calculations, and repeat blocks of code multiple times.
A switch statement allows a program to evaluate an expression and branch to different parts of code based on the resulting value. It provides an alternative to multiple if/else statements. The switch expression is compared to the values provided in each case, and if a match is found, the associated block of code is executed until a break statement. If no match is found, an optional default case is executed. Labels such as case and default are used to mark the different potential branches of code.
Switch case statements provide an alternative to long if/else statements when comparing a variable to multiple integral values. The basic format compares the variable to case values, executing code for a matching case. A default case handles non-matching values. Loops allow code to repeat, with for, while, and do-while loops. For loops initialize/update a variable and check a condition each repetition. While loops check a condition and repeat until it's false. Loops are useful for repeating tasks like displaying lists of data.
The document provides an overview of switch case and looping statements in programming. It discusses key concepts like if/else statements, switch cases, while loops, for loops, foreach loops, and break and continue statements. Examples are given for each concept along with links to online resources that demonstrate them. The document is intended to teach fundamental programming concepts for educational purposes.
The document discusses different types of looping statements in programming languages. It describes while, do-while, for, and foreach loops. It explains that while and do-while loops check a condition each iteration, for loops allow initializing and changing a counter, and foreach loops iterate over array elements. It also mentions break and continue statements that alter loop execution flow. Examples of each looping statement are provided with links to online code samples.
Programming involves instructing a computer using a programming language. There are different types of loops in programming including for, while, and repeat loops. A for loop repeats a block of code a fixed number of times based on a counting variable. It has three expressions for initialization, condition, and increment. A switch statement provides a clear way to select one of many code blocks to execute based on the value of a variable.
This document discusses programming concepts like switch case statements, looping statements, and programming languages. It provides examples of different types of control structures like if-else statements, for loops, while loops, and do-while loops. It also gives examples of how to write code using these structures and control flows in programming languages like C++.
Programming involves instructing a computer using a programming language. It allows organizing ideas about processes and things. Programming languages let programmers develop applications and scripts for computers to execute. Programming involves understanding codes, program development, and applications like web browsers. Switch cases and looping systems are important programming concepts. Switch cases allow selecting different code blocks based on a variable. Common looping structures include for, while, do-while, and foreach loops, which repeat a block of code a specified number of times. Programming requires attention to syntax and careful coding to avoid errors.
The document discusses switch case statements in programming. It provides details on the basic format and usage of switch case statements, including that they allow a variable to be tested for equality against multiple values through different cases. The document also notes some key rules for switch cases, such as requiring a break statement at the end of each case and that case values must be integer or character constants. It provides examples of switch case statements and discusses how they can provide a cleaner alternative to long if-else statements.
The document discusses switch case statements and looping in programming. It provides examples of switch case statements that check the value of a variable and execute different code blocks depending on the value. It also discusses the different types of loops - for, while, and do-while loops - and provides examples of each. The examples demonstrate how to use switch cases and loops to repeat blocks of code or make decisions based on variable values.
The document discusses different types of looping statements in programming languages including while, do-while, for, and foreach loops. It provides examples of the syntax for each loop and explains their usage - while and do-while loops check a condition each iteration, for loops initialize and increment a counter, and foreach loops iterate over array elements. Break and continue statements are also covered which can exit or skip iterations in loops respectively.
Programming languages allow programmers to develop computer programs and software by providing instructions to computers. They provide a framework for organizing ideas about processes and tasks. Programming is a broad field that involves writing scripts, applications, and programs using various programming languages. Common programming languages include C++ and DEV C++. Programming uses concepts like variables, data types, functions, and control structures like loops and conditional statements to manipulate data and develop programs.
The document provides an overview of the C programming language, including its history, uses, basic syntax, data types, variables, operators, decision making structures, loops, functions, and other common features. It begins with an introduction to C and discusses setting up the development environment. It then covers the basic structure of C programs and many fundamental aspects of the language like tokens, comments, identifiers, keywords and basic syntax rules.
The document discusses programming languages and different types of loops used in programming. It defines programming as using a computer language to develop applications and scripts for a computer to execute. It then describes the different types of loops - for loops, which allow initialization of a variable, checking a condition, and updating the variable; while loops, which repeat code while a condition is true; and do-while loops, which execute code at least once before checking the condition. Examples of each loop type are provided to illustrate their usage.
Programming involves using computer languages to develop applications, scripts, or other instructions for computers. It is a creative process where programmers instruct computers on tasks through programming languages. There are many programming languages available, with some of the most common being C++ and Dev C++. Programming can involve various structures like switch statements and loops to control program flow and repetition.
The document discusses programming concepts including switch case statements, looping, and different types of loops like for, while, and do-while loops. It provides examples of how to write switch case statements to select different code blocks based on a variable's value. It also explains the different parts of for, while, and do-while loops and provides examples of each type of loop. Several short programs are included that demonstrate using loops and switch case statements to process user input and perform calculations.
This document discusses different types of loops in computer programming including for, while, and do-while loops. It provides definitions and descriptions of each loop type, their syntax, and how they work. Nested loops are also covered, which are loops used inside other loops. Key details covered include how for loops iterate with a loop variable, while loops test conditions before executing, and do-while loops check conditions at the bottom of the loop so they always execute at least once.
It gives you the basic difference between among different types of loop...So here its my Presentation that help to clear all the confusions you faced while studying the LOOPS.
This document provides an overview of fundamental programming concepts including looping statements, switch case statements, and examples of programs using these structures. It begins with definitions of programming languages and discusses for, while, and do-while loops. Switch case statements and if/else conditional logic are also introduced. The remainder provides sample code and outputs for programs applying loops and switch cases to tasks like day selection, grading conversions, ATM transactions, and more.
2. C Language
A high-level programming language developed by Dennis
Ritchie at Bell Labs in the mid 1970s. Although originally
designed as a systems programming language, C has proved
to be a powerful and flexible language that can be used for a
variety of apllications, from business programs to
engineering. C is a particularly popular language for personal
computer programmers because it is relatively small -- it
requires less memory than other languages.
The first major program written in C was the UNIX operating
system, and for many years C was considered to be
inextricably linked with UNIX. Now, however, C is an
important language independent of UNIX.
Although it is a high-level language, C is much closer
to assembly language than are most other high-level
languages. This closeness to the underlying machine
language allows C programmers to write very efficient code.
The low-level nature of C, however, can make the language
difficult to use for some types of applications.
http://emglobio.mdl2.com/
3. C language is a computer programming language
that was developed in 1972. It is used to develop
application and system software, and has lead to
the development of other languages, including
C++.
C is a high-level programming language that was
developed in the mid-1970s. It was originally used
for writing Unix programs, but is now used to write
applications for nearly every available platform.
Compared to most previous languages, C is
easier to read, more flexible (can be used for a
wide variety of purposes), and more efficient at
using memory. http://emglobio.mdl2.com/
4. C++, pronounced "C plus plus," is a
programming language that was built off the C
language. The syntax of C++ is nearly identical
to C, but it has object-oriented features, which
allow the programmer to create objects within
the code. This makes programming easier,
more efficient, and some would even say,
more fun. Because of the power and flexibility
of the language, most software programs
today are written in C++.
http://emglobio.mdl2.com/
5. SWITCH CASE STATEMENTS
In programming,
a switch, case, select or inspect statement is a type of
selection control mechanism that exists in
most imperative programming languages. It is also
included in several other types of languages. Its purpose
is to allow the value of a variable or expression to control
the flow of program execution via a multiway branch (or
“go to", one of several labels). The main reasons for
using a switch include improving clarity, by reducing
otherwise repetitive coding, and (if the heuristics permit)
also offering the potential for faster execution through
easier complier optimization in many cases.
http://emglobio.mdl2.com/
6. Unlike if-then and if-then-else statements,
the switch statement can have a number of
possible execution paths. A switch works with
the byte, short, char, andint primitive data
types. It also works with enumerated types.
(programming)switch statement - (Or case
statement, multi-way branch) A construct found
in most high-level languages for selecting one
of several possible blocks of code or branch
destinations depending on the value of an
expression.
http://emglobio.mdl2.com/
9. C/C++ has a built-in multiple-branch selection
statement, called switch, which successively tests the
value of an expression against a list of integer
or character constants. When a match is found, the
statements associated with that constant are executed.
The expression must evaluate to a character or integer
value. Floating-point expressions, for example, are not
allowed. The value of expression is tested, in order,
against the values of the constants specified in the
case statements. When a match is found, the statement
sequence associated with that case is executed until
the break statement or the end of the switch statement
is reached. The default statement is executed if no
matches are found. The default is optional and, if it is
not present, no action takes place if all matches fail.
http://emglobio.mdl2.com/
10. LOOPING STATEMENTS
In computer science a for loop is a programming language
statement which allows code to be repeatedly executed. A for
loop is classified as an iteration statement.
Unlike many other kinds of loops, such as the while loop, the
for loop is often distinguished by an explicit loop counter or
loop variable. This allows the body of the for loop (the code
that is being repeatedly executed) to know about the
sequencing of each iteration. For loops are also typically used
when the number of iterations is known before entering the
loop. For loops are the shorthand way to make loops when
the number of iterations is known, as a for loop can be written
as a while loop.
The name for loop comes from the English word for, which is
used as the keyword in most programming languages to
introduce a for loop. The loop body is executed "for" the given
values of the loop variable, though this is more explicit in
the ALGOL version of the statement, in which a list of possible
http://emglobio.mdl2.com/
values and/or increments can be specified.
11. Very often when you write code, you want the
same block of code to run a number of times.
You can use looping statements in your code
to do this.
In JavaScript we have the following looping
statements:
while - loops through a block of code while a
condition is true
do...while - loops through a block of code
once, and then repeats the loop while a
condition is true
for - run statements a specified number of
http://emglobio.mdl2.com/
12. A loop is a way of repeating a statement a number
of times until some way of ending the loop occurs.
It might be run for a preset number of times,
typically in a for loop, repeated as long as
an expression is true (a while loop) or repeated
until an expression becomes false in a do
while loop.
Using a label, a Goto Statement can also create a
loop by jumping backwards to a label though this
is generally discouraged as a bad programming
practice. For some complex code it allows a jump
to a common exit point that simplifies the code.
http://emglobio.mdl2.com/
15. By using special loop keywords,you can loop
(jumping for those assembly junkies) through
your code. These include following categories:
1. for loop
2. while loop
3. do while.
http://emglobio.mdl2.com/
16. The for statement allows for the controlled
loop. The syntax for for loop is as follows: for
(start condition; continue condition; re-
evaluation)
program statement.
For repeating C statements whiles a condition
is true,the while provides a the necessary
mechanism. The syntax for while loop is as
follows: while (condition)
program statement.
17. The do {} while statement allows a loop to
continue whilst a condition evaluates as TRUE
(non-zero value). The loop will exacute at least
once The syntax is as follows: do {
/* do stuff */
} while (statement)
The do statement is similar to the while statement
except that its termination condition is at the end
of the body of the loop only. Thus, you want to use
a do statement,if you want to perform the body of
the loop at least once, regardless of the condition.