0% found this document useful (0 votes)
46 views

Introduction To Programming

This document provides an introduction to programming. It states that learning to program teaches people how to think, according to Steve Jobs. Programs are controlled by sets of instructions written in a programming language. There are three categories of programming languages: machine languages, assembly languages, and high-level languages. Coding is essential in many fields including entertainment, education, and agriculture. Programming helps students in electronics, electrical engineering, and mechanical engineering departments. Embedded systems training programs aim to develop students' skills to make them ready for jobs in the growing embedded systems industry, which is valued at $43 billion in India according to recent studies. The document provides an example C program to swap two numbers and discusses two different approaches to solving this problem.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Introduction To Programming

This document provides an introduction to programming. It states that learning to program teaches people how to think, according to Steve Jobs. Programs are controlled by sets of instructions written in a programming language. There are three categories of programming languages: machine languages, assembly languages, and high-level languages. Coding is essential in many fields including entertainment, education, and agriculture. Programming helps students in electronics, electrical engineering, and mechanical engineering departments. Embedded systems training programs aim to develop students' skills to make them ready for jobs in the growing embedded systems industry, which is valued at $43 billion in India according to recent studies. The document provides an example C program to swap two numbers and discusses two different approaches to solving this problem.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

Introduction to Programming

Everybody in this country should


learn how to program a computer
because it teaches you how to think.
-Steve Jobs

What is a .
The functions of a computer system are
controlled by computer programs
A computer program is a clear, step-by-step,
finite set of instructions
A computer program is written in a computer
language called a programming
language

3 categories of programming languages:

Machine languages

Assembly languages

High-level languages

Coding is essential in all


fields:
Entertainment

Education
Agriculture

Applications of high level programming.

How does programming help


ECE, EEE, Mechanical
department students.

Embedded Systems

Facts
Embedded Systems Training Program
The Embedded Systems program is aimed to develop the skills of the students and
make them
industry ready for the booming embedded Systems industry. Some of the facts about
the industry are mentioned below -

Some Industry Facts

According to a recent NASSCOM McKinsey study, the market size of Indian


Embedded Systems industry is valued to be $ 43 billion by 2015. it is growing at an
impressive CAGR of 21% and creating lacs of jobs year on year.

There are over 130 chip design firms present in Indiathe vast pool of talent and
growing domestic market has helped the country emerge as an important centre
for chip design.

Booming semiconductor industry promises lacs of jobs by 2015, according to a


report by the Indian Semiconductor Association (ISA) and global consulting
company Frost & Sullivan

Exercise:

Write a C program to swap two


numbers x=10 & y=5.

Normal approach.
#include <stdio.h>
int main()
{
int x, y, temp;
printf("Enter the value of x and y\n");
scanf("%d%d", &x, &y);
printf("Before Swapping\nx = %d\ny = %d\n",x,y);
temp = x;
x = y;
y = temp;
printf("After Swapping\nx = %d\ny = %d\n",x,y);
return 0;
}

Think different
#include <stdio.h>
int main()
{
int x = 10, y = 5;

1st approach
using
arithmetic
operator

// Code to swap 'x' and 'y'


x = x + y; // x now becomes 15
y = x - y; // y becomes 10
x = x - y; // x becomes 5
printf("After Swapping: x = %d, y = %d", x, y);
return 0;
}

2nd approach
using Using
Bitwise
XOR

#include <stdio.h>
int main()
{
int x = 10, y = 5;

// Code to swap 'x' (1010) and 'y' (0101)


x = x ^ y; // x now becomes 15 (1111)
y = x ^ y; // y becomes 10 (1010)
x = x ^ y; // x becomes 5 (0101)

printf("After Swapping: x = %d, y = %d", x, y);

return 0;
}

Thank You !!

You might also like