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

Done Certificate-Merged PDF

The document is an internship report submitted by Rahin Rawoot on web development and programming with C and C++. It discusses various aspects of front-end development including HTML, CSS, Bootstrap, JavaScript and React. It also covers backend development with SQL, PHP and database management systems. The report provides an introduction to C and C++ programming concepts such as tokens, functions, structures, loops, pointers, classes and objects. It discusses debugging and file handling in C++. The internship aimed to gain experience in web development technologies and programming with C and C++.

Uploaded by

Aniket Pawar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Done Certificate-Merged PDF

The document is an internship report submitted by Rahin Rawoot on web development and programming with C and C++. It discusses various aspects of front-end development including HTML, CSS, Bootstrap, JavaScript and React. It also covers backend development with SQL, PHP and database management systems. The report provides an introduction to C and C++ programming concepts such as tokens, functions, structures, loops, pointers, classes and objects. It discusses debugging and file handling in C++. The internship aimed to gain experience in web development technologies and programming with C and C++.

Uploaded by

Aniket Pawar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

A

INTERNSHIP REPORT

ON

WEB DEVELOPMENT AND PROGRAMMING WITH


C AND C++

Submitted by
RAHIN RAWOOT
Roll no: 2130331372079

Department of Electronics & Telecommunication Engineering


Dr. Babasaheb Ambedkar Technological University, Lonere.
Lonere-402103

2022 -2023
A

INTERNSHIP REPORT

ON

WEB DEVELOPMENT AND PROGRAMMING WITH


C AND C++
Submitted by
RAHIN RAWOOT
Roll no: 2130331372079

In the partial fulfilment of B. Tech. in Electronics & Telecommunication


Engineering course of
Dr. Babasaheb Ambedkar Technological University,Lonere (Dist. Raigad)
in the academic year 2022-2023

Department of Electronics & Telecommunication Engineering


Dr. Babasaheb Ambedkar Technological University,
Lonere

2022-2023
ACKNOWLEDGEMENT

I thank to Dr. Sanjay L. Nalbalwar Professor and Head of Electronic and


Telecommunication Engineering department, for his valuable suggestion and cooperation
in the completion of the Internship.

RAHIN RAWOOT
(2130331372079)
CERTIFICATE

This is to certify that the Industrial training done in company entitled


“WEB DEVELOPMENT AND PROGRAMMING WITH C AND
C++” submitted by RAHIN RAWOOT (Roll no. 2130331372079) is
record of bonafide work carried out by him under my guidance in the
partial fulfilment the requirement for the award of Degree of B.Tech. in
Electronics and Telecommunication Engineering course of Dr. Babasaheb
Ambedkar Technological University, Lonere (Dist. Raigad) in the
academic year 2022-2023.

Prof. S. L. NALBALWAR
Head of Department
Electronics and Telecommunication Engineering
Dr. Babasaheb Ambedkar Technological University
Lonere-Raigad 402103

DATE:
PLACE: Lonere, Raigad (402103)
Internship Certificate
Abstract
This thesis considers several instances of abstraction that arose in the design and
implementation of the web programming language Links. The first concerns user interfaces,
specified using HTML forms. We wish to construct forms from existing form fragments
without introducing dependencies on the implementation details of those fragments.
Surprisingly, many existing web systems do not support this simple scenario. We present a
library which captures the essence of form abstraction, and extend it with more practical
facilities, such as validation of the HTML a program produces and of the input a user submits.
An important part of our library is a simple semantics, given as the composition of three
primitive “idioms”, an interface to computation introduced by McBride and Paterson. In order
to justify this approach we present a comparison of idioms with the related notions of monads
and arrows, refining the informal claims in the literature. The C programming language is a
general-purpose language with almost endless applications like in operating systems, language
compilers, network drivers, language interpreters, and system utilities areas of development.
Even today Facebook uses C and C++ in their applications because of its lower disk space
usage and performance. The world is running on C-powered devices. C is the past, the present,
the future in many areas of software. C++ is the most commonly used language in introductory
and intermediate programming courses in many universities. This language had its rapid
development in recent years. Its abstractions are more flexible and affordable than ever before.
There are so many new features in the new standard, known as C++11, that it may be
considered a new language. All these changes should find their place in teaching and will force
us to utterly reorganize our programming courses. In this paper we comment on the situation
in programming courses at our University and share experience in teaching C++11 in the course
of Object Oriented Programming (OOP). We justify the relevance of the chosen language
features and fix certain difficulties in proper mastering by students. We provide some specific
recommendations for overcoming these difficulties.
INDEX

Sr. No Contents Page


NO.

CHAPTER 1 INTRODUCTION 1
1.1 What is Wed Development?

CHAPTER 2 FRONT END DEVELOPMENT 2


2.1 HTML
2.1.1 Attributes
2.2 CSS
2.3 Bootstrap
2.4 JavaScript
2.4.1 JavaScript Array
2.4.2 JavaScript Functions
2.4.3 JavaScript String
2.5 React

CHAPTER 3 BACKEND DEVELOPMENT 9


3.1 SQL
3.1.1 SQL Process
3.1.2 DBMS
3.2 PHP

CHAPTER 4 INTRODUCTION TO C 13
4.1 What is C?

I
CHAPTER 5 TOKENS 14

CHAPTER 6 USER DEFINED FUNCTION 15

CHAPTER 7 STRUCTURE IN C 16

CHAPTER 8 LOOPS IN C 18

CHAPTER 9 POINTERS IN C 19

CHAPTER 10 INTRODUCTION TO C++ 20

CHAPTER 11 CLASS AND OBJECT 21

CHAPTER 12 DEBUGGING 23

CHAPTER 13 FILE HANDLING 24

CONCLUSION
REFERENCE

II
LIST OF FIGURES

FIGURE NO. TITLE OF FIGURE PAGE


NO.

Figure 1.1 Web Development 1

Figure 2.1 HTML Structure 2

Figure 2.1.1 Attributes 3

Figure 2.2 CSS Syntax 4

Figure 2.3.1 Bootstrap Form 5

Figure 2.4 Features of JavaScript 6

Figure 2.5 Block Diagram, of React 8

Figure 3.1 Block Diagram of SQL 9

Figure 3.2 Data Models 10

Figure 3.3 DBMS Network Model 11


Figure 3.4 PHP Form 12

Figure 4.1 Syntax of C programming 13

Figure 5.1 Tokens 14

Figure 6.1 Function Declaration 15

Figure 7.1 Structure of C 17

Figure 7.2 Section in C 17

Figure 9.1 Pointers 19

Figure 10.1 Syntax of C++ 20

Figure 11.1 Class and Object 21

III
Figure 11.2 Objects 22

Figure 12.1 Error Types 23

Figure 13.1 File Handling in C++ 24

IV
LIST OF ABBREVIATION

HTML Hyper Text Markup Language


CSS Cascading Style Sheet
SQL Structured Query Language
DBMS DataBase Management System

V
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 1
INTRODUCTION

1.1What is Web Development?


The Internet is the global system of interconnected computer networks that use the Internet
protocol suite to link devices worldwide. It is a network of networks that consists of private, public,
academic, business, and government networks of local to global scope, linked by a broad array of
electronic, wireless, and optical networking technologies. The World Wide Web (abbreviated
WWW or the Web) is an information space where documents and other web resources are
identified by Uniform Resource Locators (URLs), interlinked by hypertext links, and accessible
via the Internet. 2 Now, to use these services, we need some software which can build things and
hence helping our work done on the web. Web technologies which we will be covering to build
those things are HTML, CSS, JavaScript, Node.js, Express.js etc. The primary focus for back-end
will be on the Node.js which powers a huge amount of devices websites.. Examples of web
applications are social networking sites like Facebook or e-commerce sites like Amazon. The good
news is that learning web development is not that hard! In fact, many argue it’s the best form of
coding for beginners to learn No matter whether you’re looking for a career or just want to learn
coding, learning how to develop for the web is for you. It’s one of the smartest decisions you will
ever make! “Full Stack” Developers marry both sides into one. A Full Stack developer can
comfortably work with both the front and back ends. This is what we focus on building you up to
here.Back End Developers make use of programming languages like Java, Python, and Ruby
(among many others) to work with data. Web design encompasses many different skills and
disciplines in the production and maintenance of websites.

Fig 1.1 Web development

1
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

CHAPTER 2
FRONTEND DEVELOPMENT
Front-end web development is everything involved in programming the user interface of a
web application. Typically it refers to the Hypertext Mark-up Language (HTML), Cascading Style
Sheets (CSS) and JavaScript portion of web site production as opposed to the database or server-
side programming. It encompasses everything from building a simple page of HTML text to
creating complex, responsive HTML5 websites designed to be accessed via various different
browsers, devices and screen sizes.

2.1 HTML (Hyper Text Markup Language)


HTML is a mark up language that defines the structure of your content. HTML consists
of a series of elements, which you use to enclose, or wrap, different parts of the content to make it
appear a certain way, or act a certain way. The enclosing tags can make a word or image hyperlink
to somewhere else, can italicize words, can make the font bigger or smaller, and so on. HTML
uses predefined tags and elements which tell the browser how to properly display the content.
Remember to include closing tags. If omitted, the browser applies the effect of the opening tag
until the end of the page.

Fig 2.1 HTML page structure

2
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

The basic structure of an HTML page is laid out below. It contains the essential building-
block elements (i.e. Doctype declaration, HTML, head, title, and body elements) upon which all
web pages are created.

A doctype or document type declaration is an instruction that tells the web browser about
the markup language in which the current page is written. The Doctype is not an element or tag,
it lets the browser know about the version of or standard of HTML or any other markup language
that is being used in the document. The <html> tag in HTML is used to define the root of HTML
and XHTML documents. The <html> tag tells the browser that it is an HTML document. It is the
second outer container for everything that appears in an HTML document followed by the
<!DOCTYPE> tag. The <html> tag requires a starting and end tag. The <head> tag in HTML is
used to define the head portion of the document which contain information related to
document.The <head> tag contains other head elements such as <title>, <meta>, <link>, <style>
<link> etc. The <title> tag in HTML is used to define the title of HTML document. It sets the
title in the browser toolbar. It provides the title for the web page when it is added to favorites. It
displays the title for the page in search engine results. The <body> tag in HTML is used to define
the main content present inside an HTML page. It is always enclosed within <html>tag. The
<body> tag is the last child of <html> tag.

2.1.1 Attributes
HTML attributes are the special words placed inside the opening tags and used to define
the characteristics of an HTML element. The HTML attributes contain two parts, attribute name,
and its value. The attribute pairs (attribute_name, attribute_value) are separated using equal (=)
operator. The attribute value is closed inside double quotes (” “).

Fig 2.1.1 Attributes

3
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

2.2 Cascading Style Sheet (CSS)


Cascading Style Sheets, fondly referred to as CSS, is a simply designed language
intended to simplify the process of making web pages presentable. CSS allows you to apply
styles to web pages. More importantly, CSS enables you to do this independent of the HTML
that makes up each web page. It describes how a webpage should look: it prescribes colors, fonts,
spacing, and much more. In short, you can make your website look however you want. CSS lets
developers and designers define how it behaves, including how elements are positioned in the
browser.While html uses tags, css uses rulesets. CSS is easy to learn and understand, but it
provides powerful control over the presentation of an HTML document.

Fig 2.2 CSS syntax

The selector points to the HTML element you want to style.The declaration block contains
one or more declarations separated by semicolons.Each declaration includes a CSS property name
and a value, separated by a colon.CSS declarations are separated with semicolons, and declaration
blocks are surrounded by curly braces.

Internal or embedded CSS requires you to add <style> tag in the <head> section of your
HTML document.This CSS style is an effective method of styling a single page. However,
using this style for multiple pages is time-consuming as you need to put CSS rules on every
page of your website.With external CSS, you’ll link your web pages to an external .css file,
which can be created by any text editor in your device (e.g., Notepad++).
This CSS type is a more efficient method, especially for styling a large website. By editing
one .css file, you can change your entire site at once.Inline CSS is used to style a specific
HTML element. For this CSS style, you’ll only need to add the style attribute to each HTML
tag, without using selectors.This CSS type is not really recommended, as each HTML tag
needs to be styled individually.

4
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

2.3 Bootstrap
Bootstrap is a free and open-source tool collection for creating responsive websites and web
applications. It is the most popular HTML, CSS, and JavaScript framework for developing
responsive, mobile-first websites. It solves many problems which we had once, one of which is
the cross-browser compatibility issue. Nowadays, the websites are perfect for all the browsers
(IE, Firefox, and Chrome) and for all sizes of screens (Desktop, Tablets, Phablets, and Phones).
All thanks to Bootstrap developers -Mark Otto and Jacob Thornton of Twitter, though it was later
declared to be an open-source project. Bootstrap has evolved many versions and every time when
we want to use this framework we can select the version which we want to use.

2.3.1 Bootstrap Form


Bootstrap provides a number of classes for styling forms, and specific form controls receive
some global styling. Many of the form classes can help with keeping a consistent look across your
forms. They can also help with alignment so you shouldn't need to play around with alignments,
padding, margins, etc just to get the form looking right.

Fig 2.3.1 Bootstrap Form

The .form-group class is the easiest way to add some structure to forms. It provides a flexible
class that encourages proper grouping of labels, controls, optional help text, and form validation
messaging. By default it only applies margin-bottom but it picks up additional styles in .form-
inline as needed.

5
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

2.4 JavaScript
JavaScript is a lightweight, cross-platform, and interpreted compiled programming
language which is also known as the scripting language for webpages.It is well-known for the
development of web pages, many non-browser environments also use it. JavaScript can be used
for Client-side developments as well as Server-side developments.Javascript is imperative and
declarative type of language. JavaScript contains a standard library of objects, like Array, Date,
and Math, and a core set of language elements like operators, control structures, and statements.

Fig 2.4 Features of JavaScript

Features of JavaScript:
1-JavaScript was created in the first place for DOM manipulation.
Earlier websites were mostly static, after JS was created dynamic Web sites were made.
2-Functions in JS are objects. They may have properties and methods just like another object.
3-They can be passed as arguments in other functions.Can handle date and time.Performs Form
Validation although the forms are created using HTML.
4-No compiler is needed.

6
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

2.4.1 JavaScript Arrays


JavaScript Array is used to store multiple elements in a single variable. It is often used
when we want to store a list of elements and access them by a single variable. Unlike most
languages where the array is a reference to the multiple variables, in JavaScript array is a single
variable that stores multiple elements.

Syntax:

2.4.2 JavaScript Functions


The JavaScript function is a set of statements that take inputs, do some specific
computation, and produce output. Basically, a function is a set of statements that performs some
tasks or does some computation and then return the result to the user.

Syntax:

2.4.3 JavaScript String


JavaScript strings are used for storing and manipulating text. It can contain zero or more
characters within quotes.

Syntax:

7
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

2.5 React
React JS is a declarative, efficient, and flexible JavaScript library for building reusable UI
components. It is an open-source, component-based front end library responsible only for the view
layer of the application. It was created by Jordan Walke, who was a software engineer
at Facebook. It was initially developed and maintained by Facebook and was later used in its
products like WhatsApp & Instagram. Facebook developed React JS in 2011 in its newsfeed

Fig 2.5 Block Diagram of React

A React JS application is made up of multiple components, each component responsible


for outputting a small, reusable piece of HTML code. The components are the heart of all React
applications. These Components can be nested with other components to allow complex
applications to be built of simple building blocks. React JS uses virtual DOM based mechanism to
fill data in HTML DOM. The virtual DOM works fast as it only changes individual DOM elements
instead of reloading complete DOM every time.

To create React app, we write React components that correspond to various elements. We
organize these components inside higher level components which define the application structure.
For example, we take a form that consists of many elements like input fields, labels, or buttons.
We can write each element of the form as react components, and then we combine it into a higher-
level component, i.e., the form component itself. The form components would specify the structure
of the form along with elements inside of it.

8
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 3
BACKEND DEVELOPMENT
Backend Development is the term for the behind-the-scenes activities that happens when
you do anything on a website or web application. It is mostly referred to the server-side of an
application and everything that communicates between the database and frontend/browser.You can
also say that it’s the server side of development that focuses primarily on how the site works. A
Backend Developer is a skilled software developer responsible for or skilled enough to understand,
plan, develop and test the server-side/business logic of an application. In conjunction with other
team members, he is responsible for deciding the best and suitable tools and technologies for the
project at hand. Back-end development means working on server-side software, which focuses on
everything you can't see on a website. Back-end developers ensure the website performs correctly,
focusing on databases, back-end logic, application programming interface (APIs), architecture, and
servers.

3.1 SQL (Structured Query Language)


SQL stands for Structured Query Language. It is used for storing and managing data in
relational database management system (RDMS).It is a standard language for Relational Database
System. It enables a user to create, read, update and delete relational databases and tables.All the
RDBMS like MySQL, Informix, Oracle, MS Access and SQL Server use SQL as their standard
database language.SQL allows users to query the database in a number of ways, using English-like
statements.

3.1.1 SQL Process


When an SQL command is executing for any RDBMS, then the system figure out the best
way to carry out the request and the SQL engine determines that how to interpret the task.In
process, various components are included. These components can be optimization Engine, Query
engine, Query dispatcher, classic, etc.All the non-SQL queries are handled by the classic query
engine, but SQL query engine won't handle logical files.

In SQL, explain keyword provides a description of how the SQL queries are executed by the
databases. These descriptions include the optimizer logs, how tables are joined and in which order
etc. Hence, it would be a beneficial tool in query optimization and knowing the details of its
execution step by step.

9
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

Fig 3.1 Block Diagram of SQL

3.1.2 DBMS (DATABASE MANAGEMENT SYSTEM)


Database management system is a software which is used to manage the database. For
example: MySQL, Oracle, etc are a very popular commercial database which is used in different
applications.DBMS provides an interface to perform various operations like database creation,
storing data in it, updating data, creating a table in the database and a lot more.It provides protection
and security to the database. In the case of multiple users, it also maintains data consistency. Data
Model is the modelling of the data description, data semantics, and consistency constraints of the
data. It provides the conceptual tools for describing the design of a database at each level of data
abstraction.

Fig 3.2 Data Models

10
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

Relational Data Model is type of model designs the data in the form of rows and columns
within a table.Thus, a relational model uses tables for representing data and in-between
relationships. Tables are also called relations. This model was initially described by Edgar F. Codd,
in 1969. The relational data model is the widely used model which is primarily used by commercial
data processing applications. An ER model is the logical representation of data as objects and
relationships among them. These objects are known as entities, and relationship is an association
among these entities. An extension of the ER model with notions of functions, encapsulation, and
object identity, as well. This model supports a rich type system that includes structured and
collection types. This model was designed by Peter Chen and published in 1976 papers. It was
widely used in database designing. A set of attributes describe the entities. For example, student
name, studentid describes the 'student' entity. A set of the same type of entities is known as an the
set of the same type of relationships is known as 'relationship set Semistructured.

Fig 3.3 DBMS network Model

Data Model is type of data model is different from the other three data models (explained
above). The semistructured data model allows the data specifications at places where the individual
data items of the same type may have different attributes sets. The Extensible Markup Language,
also known as XML, is widely used for representing the semistructured data. Although XML was
initially designed for including the markup information to the text document, it gains importance
because of its application in the exchange of data.

11
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

3.2 PHP
PHP started out as a small open source project that evolved as more and more people found
out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.PHP
is a recursive acronym for "PHP: Hypertext Preprocessor".PHP is a server side scripting language
that is embedded in HTML. It is used to manage dynamic content, databases, session tracking,
even build entire e-commerce sites.It is integrated with a number of popular databases, including
MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.PHP is pleasingly
zippy in its execution, especially when compiled as an Apache module on the Unix side. The
MySQL server, once started, executes even very complex queries with huge result sets in record-
setting time.PHP supports a large number of major protocols such as POP3, IMAP, and LDAP.
PHP4 added support for Java and distributed object architectures (COM and CORBA), making n-
tier development a possibility for the first time.PHP is forgiving: PHP language tries to be as
forgiving as possible.PHP Syntax is C-Like.

Form Validation is a necessary process before the data entered in the form is submitted to the
database. This is done to avoid unnecessary errors. In PHP Form validation, the script checks for
data in respective fields based on the rules set by the developer, and returns an error if it does not
meet the requirements

Fig 3.4 PHP form

12
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 4
INTRODUCTION TO C
4.1 What is C?
C is a general-purpose programming language, and is used for writing programs in many different
domains, such as operating systems, numerical computing, graphical applications, etc.It provides
“high-level” structured programming constructs such as statement grouping, decision making, and
looping, as well as “low level” capabilities such as the ability to manipulate bytes and addresses.
Since C is relatively small, it can be described in a small space, and learned quickly. A programmer
can reasonably expect to know and understand and indeed regularly use the entire language [KR88,
page2].C achieves its compact size by providing spartan services within the language proper,
foregoing many of the higher-level features commonly built-in to other languages. For example,
C provides no operations to deal directly with composite objects such as lists or arrays. There are
no memory management facilities apart from static definition and stack-allocation of local
variables. And there are no input/output facilities, such as for printing to the screen or writing to a
file. Much of the functionality of C is provided by way of software routines called functions. The
language is accompanied by a standard library of functions that provide a collection of
commonlyused operations. For example, the standard function printf () prints text to the screen (or,
more precisely, to standard output which is typically the screen). C program syntax is easy to learn
and read; this makes debugging code more accessible and faster. C programs are relatively short
compared to other languages, which reduces the time needed to complete them. C is a powerful
programming language that enables developers to create sophisticated software systems.

Fig 4.1 Syntax of C Programming

13
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

CHAPTER 5
TOKENS
Tokens are some of the most important elements used in the C language for creating a program.
One can define tokens in C as the smallest individual elements in a program that is meaningful to
the functioning of a compiler.A token is the smallest unit used in a C program. Each and every
punctuation and word that you come across in a C program is token. A compiler breaks a C program
into tokens and then proceeds ahead to the next stages used in the compilation process.For instance,
without words, you cannot create any sentence- similarly, you cannot create any program without
using tokens in C language. Thus, we can also say that tokens are the building blocks or the very
basic components used in creating any program in the C language.

Fig 5.1 Tokens

These are used to name the arrays, functions, structures, variables, etc. The identifiers
are user-defined words in the C language. These can consist of lowercase letters, uppercase letters,
digits, or underscores, but the starting letter should always be either an alphabet or an underscore.
We can define the keywords as the reserved or pre-defined words that hold their own importance.
It means that every keyword has a functionality of its own. Since the keywords are basically
predefined words that the compilers use, thus we cannot use them as the names of variables. If we
use the keywords in the form of variable names, it would mean that we assign a different meaning
to it- something that isn’t allowed.

14
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 6
USER DEFINED FUNCTION

User-defined functions in C language are defined by the programmer to perform specific


operations. They are also known as “tailor made function” which are built only to satisfy the
given condition. We can classify functions into call by value or call by reference. One can avoid
duplication of code in the programs by using functions. Code can be written more quickly and
be more readable as a result.Code can be divided and conquered using functions. This process is
Divide and Conquer. It is difficult to write large amounts of code within the main function, as
well as testing and debugging. Our one task can be divided into several smaller sub-tasks by
using functions, thus reducing the overall complexity.For example, when using pow, sqrt, etc. in
C without knowing how it is implemented, one can hide implementation details with
functions.With little to no modifications, functions developed in one program can be used in
another, reducing the development time.

6.1 Elements of User-Defined Function in C


A function prototype is also known as a function declaration which specifies
the function’s name, function parameters, and return type. The function prototype does not
contain the body of the function. It is basically used to inform the compiler about the user-
defined function which can be used in the later part of the program .

Fig 6.1 Function declaration

In order to transfer control to a user-defined function, we need to call it. Functions are called
using their names followed by round brackets. Their arguments are passed inside the brackets.

15
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

CHAPTER 7
STRUCTURES IN C

The basic structure of a C program is divided into 6 parts which makes it easy to read,
modify, document, and understand in a particular format. C program must follow the below
mentioned outline in order to successfully compile and execute. Debugging is easier in a well -
structured C program.

1-Documentation
This section consists of the description of the program, the name of the program, and the creation
date and time of the program. It is specified at the start of the program in the form of comments.

2-preprocessor Structure
All the header files of the program will be declared in the Preprocessor section of the program.
Header files help us to access other’s improved code into our code. A copy of these multiple files
is inserted into our program before the process of compilation.

3-Defination
Preprocessor are the programs that process our source code before the process of compilation.
There are multiple steps which are involved in the writing and execution of the program.
Preprocessor directives start with the ‘#’ symbol. The #define preprocessor is used to create a
constant throughout the program. Whenever this name is encountered by the compiler, it is
replaced by the actual piece of defined code.

4-Global Declaration
The global declaration section contains global variables, function declaration, and static
variables. Variables and functions which are declared in this scope can be used anywhere in the
program.

5-Main function
Every C program must have a main function.The main() function of the program is written in
this section. Operations like declaration and execution are performed inside the curly braces of
the main program.

16
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

6-SubProgramms
User-defined functions are called in this section of the program. The control of the program is
shifted to the called function whenever they are called from the main or outside the main ()
function. These are specified as per the requirements of the programmer.

Fig 7.1 Structure of C

Structure of a program. The sections of a program usually get shuffled and the chance of
omission of error rises. The structure of a language gives us a basic idea of the order of the sections
in a program. We get to know when and where to use a particular statement, variable, function,
curly braces, parentheses, etc. It also increases our interest in that programming language. T\he
structure of a C. Sometimes, when we begin with a new programming language, we are not aware
about the basic program means the specific structure to start the programming in the C language.

Fig 7.2 Section in C

17
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

CHAPTER 8
LOOPS IN C

The looping can be defined as repeating the same process multiple times until a specific
condition satisfies. There are three types of loops used in the C language. In this part of the tutorial,
we are going to learn all the aspects of C loops. The looping simplifies the complex problems into
the easy ones. It enables us to alter the flow of the program so that instead of writing the same code
again and again, we can repeat the same code for a finite number of times.

1-do while loop:


The do-while loop continues until a given condition satisfies. It is also called post tested loop. It is
used when it is necessary to execute the loop at least once (mostly menu driven programs).
Syntax:
do{
//code to be executed
} while(condition);

2-while loop:
The while loop in c is to be used in the scenario where we don't know the number of iterations in
advance. The block of statements is executed in the while loop until the condition specified in the
while loop is satisfied. It is also called a pre-tested loop.
Syntax:
while(condition){
//code to be executed
}

3-for loop:
The for loop is used in the case where we need to execute some part of the code until the given
condition is satisfied.
Syntax:
for(initialization;condition;incr/decr){
//code to be executed
}

18
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 9
POINTERS IN C

The pointer in C language is a variable which stores the address of another variable. This
variable can be of type int, char, array, function, or any other pointer. The size of the pointer
depends on the architecture. However, in 32-bit architecture the size of a pointer is 2 byte.

Fig 9.1 Pointer


Just like the variables, we also have to declare the pointers in C before we use them in any
program. We can name these pointers anything that we like, as long as they abide by the naming
rules of the C language. Normally, the declaration of a pointer would take a form like this: data
type * name of pointer variable.Note that here.The data type refers to this pointer’s base type in
the variable of C. It indicates which type of variable is the pointer pointing to in the code.The
asterisk (*) is used to declare a pointer. It is an indirection operator, and it is the same asterisk that
we use in multiplication.We can declare pointers in the C language with the use of the asterisk
symbol (*). It is also called the indirection pointer, as we use it for dereferencing any pointer. Here
is how we use it: int *q; // a pointer q for int data type and char *x; // a pointer x for char data type.
Once we declare a pointer, we then initialise it just like the standard variables using an address
of the variable. In case we don’t initialise the pointers in any C program and start using it directly,
the results can be pretty unpredictable and potentially disastrous.

19
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

CHAPTER 10
INTRODUCTION TO C++

10.1 What is C++?


C++ is one of the every green programming languages and loved by millions of software
developers. If you are a great C++ programmer then you will never sit without work and more
importantly you will get highly paid for your work.C++ is a middle-level programming language
developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms,
such as Windows, Mac OS, and the various versions of UNIX. This C++ tutorial adopts a simple
and practical approach to describe the concepts of C++ for beginners to advanded software
engineers. C++ is very close to hardware, so you get a chance to work at a low level which gives
you lot of control in terms of memory management, better performance and finally a robust
software development. There are 1000s of good reasons to learn C++ Programming. But one thing
for sure, to learn any programming language, not only C++, you just need to code, and code and
finally code until you become expert. C++ is the most widely used programming languages in
application and system programming. So you can choose your area of interest of software
development. C++ programming has been used in developing almost all the major Operating
Systems like Windows, Mac OSX and Linux. Apart from the operating systems, the core part of
many browsers like Mozilla Firefox and Chrome have been written using C++. C++ also has been
used in developing the most popular database system called MySQL.

Fig 10.1 Syntax of C++

20
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 11
CLASS AND OBJECT

A class in C++ is the building block that leads to Object-Oriented programming. It is a user-
defined data type, which holds its own data members and member functions, which can be
accessed and used by creating an instance of that class. A C++ class is like a blueprint for an
object. For Example: Consider the Class of Cars. There may be many cars with different names
and brand but all of them will share some common properties like all of them will have 4
wheels, Speed Limit, Mileage range etc. So here, Car is the class and wheels, speed limits,
mileage are their properties. A Class is a user defined data-type which has data members and
member functions.Data members are the data variables and member functions are the functions
used to manipulate these variables and together these data members and member functions
defines the properties and behavior of the objects in a Class.In the above example of class Car,
the data member will be speed limit, mileage etc and member functions can be apply
brakes, increase speed etc.

Fig 11.1 Class and Object

An Object is an instance of a Class. When a class is defined, no memory is allocated but when it
is instantiated (i.e. an object is created) memory is allocated. When a class is defined, only the
specification for the object is defined; no memory or storage is allocated. To use the data and
access functions defined in the class, you need to create object The data members and member

21
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

functions of class can be accessed using the dot (‘.’) operator with the object. The public data
members are also accessed in the same way given however the private data members are not
allowed to be accessed directly by the object. Accessing a data member depends solely on the
access control of that data member. This access control is given by Access modifiers in C++.
There are three access modifiers: public, private and protected.

When you define a class, you define a blueprint for a data type. This doesn't actually define
any data, but it does define what the class name means, that is, what an object of the class will
consist of and what operations can be performed on such an object. A class definition starts with
the keyword class followed by the class name; and the class body, enclosed by a pair of curly
braces. A class definition must be followed either by a semicolon or a list of declarations. For
example, we defined the Box data type using the keyword class as follows:
class Box {
public:
double length; // Length of a box
double breadth; // Breadth of a box
double height; // Height of a box
};

Fig 11.2 Object

Everything in C++ is associated with classes and objects, along with its attributes and methods.
For example: in real life, a car is an object. The car has attributes, such as weight and color.

22
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CHAPTER 12
DEBUGGING

Debugging is a methodical process of finding and reducing the number of bugs (or defects)
in a computer program, thus making it behave as originally expected. There are two main types of
errors that need debugging: I Compile-time: These occur due to misuse of language constructs,
such as syntax errors. Normally fairly easy to find by using compiler tools and warnings to fix
reported problems. gcc Wall pedantic c main.c I Run-time: These are much harder to figure out,
as they cause the program to generate incorrect output (or “crash”) during execution.

Fig 12.1 Error types

The program contains a defect in the source code, either due to a design misunderstanding
or an implementation mistake. This defect is manifested as a runtime failure. The program could:
I crash with a memory error or “segmentation fault” I return an incorrect result I have unintended
side-effects like corrupting persistent storage the art of debugging arises because defects do not
materialise predictably. I The program may require specific inputs to trigger a bug I Undefined or
implementation-defined behaviour may cause it to only crash on a particular operating system or
hardware architecture I The issue may require separate runs and many hours (or months!) of
execution time to manifest. Defects are not necessarily located in the source code near a particular
runtime failure.A variable might be set incorrectly that causes a timer to fire a few seconds too
late.

23
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

CHAPTER 13
FILE HANDLING

File handling in C++ is a mechanism to store the output of a program in a file and help perform
various operations on it. Files help store these data permanently on a storage device. he term “Data”
is commonly referred to as known facts or information. In the present era, data plays a vital role.
It helps to describe, diagnose, predict or prescribe. But to achieve all this, we need to store it
somewhere. You all would argue that there are so many text editors like ‘Notepad’ and ‘MS
Office’, which help us store data in the form of text. You are right! But here we are discussing at
a level of programming. In contrast, text editors like ‘Notepad’ and ‘MS Office’ are pre-built and
cannot be accessed at the programming level to store data. File Handling is a hot topic when it
comes to storing such programming data. o read or enter data to a file, we need to open it first.
This can be performed with the help of ‘ifstream’ for reading and ‘fstream’ or ‘ofstream’ for
writing or appending to the file. All these three objects have open() function pre-built in them.
open( Filename , Mode );

Fig 13.1 File Handling in C++

Till now, we learned how to create the file using C++. Now, we will learn how to write data to file
which we created before. We will use fstream or ofstream object to write data into the file and to
do so; we will use stream insertion operator (<<) along with the text enclosed within the double-
quotes. The major advantage of this method of opening a file is that more than one files can be
opened at a time in a program. The major advantage of binary files is that they require less memory
space for storage of data. Moreover, these files can be used to read or write structured data such as
structures, class objects etc.

24
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
A INETRNSHIP REPORT ON “WEB DEVELOPMENTAND PROGRAMMING WITH C AND C++”

CONCLUSION
Web development, a good page design is essential. A bad design will lead to the loss of visitors
and that can lead to a loss of business. In general, a good page layout has to satisfy the basic
elements of a good page design. This includes color contrast, text organization, font selection, style
of a page, page size, graphics used, and consistency. In order to create a well-designed page for a
specific audience. The developer needs to organized and analyze the users' statistics and the
background of the users. Although it can be hard to come up with a design that is well suited to all
of the users, there will be a design that is appropriate for most of the audience. The better the page
design, the more hits a page will get. That implies an increase in accessibility and a possible
increase in business. C is most useful for embedded systems, or applications that require the ability
to be light-weight and have precise control over system resources. C is lacking a lot of the
functionality that more contemporary languages feature, but remains a core tool for Unix
developers. When we set out to build an embedded system, we should first consider using C. Java
was the next language we examined. C++ has the same advantages as C, but with more features.
C++ has a steep learning curve that makes it less approachable by a novice programmer. Big
applications should not be written in C++, but a small to medium sized applications can be written
in C++ for added speed and scalability. Programs that require speed, scalability, and are not
massive, should consider using C++. We should have a good idea of when it might be appropriate
to use each language.

25
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.
AN INTERNSHIP REPORT ON “WEB DEVELOPMENT”

REFERENCE

https://trainings.internshala.com

26
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE.

You might also like