Internship Presentation

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 40

A PRESENTATION ON INTERNSHIP AT :

Guided By : Mr. Parthesh Mankodi


Subject Name : Industrial Internship
Subject Code : 102000801
Presented By : Prakash Vala
Enroll No. : 12002060501022 1
Company Introduction

VOLANSYS, AN ACL DIGITAL COMPANY


ENABLES OEMS, ENTERPRISES AND
GROWTH-STAGE STARTUPS TO BUILD
CONNECTED & SCALABLE SOLUTIONS.

Address :
Block A-7th Floor, Safal Profitaire, Corporate
Road, Prahladnagar, Ahmedabad-380 015,
Gujarat 2
PRODUCT

DOMAINS
ENGINEERING

DIGITAL
ENGINEERING

QUALITY
ENGINEERING
5. Timeline of Internship
• Linux Essentials - 1
January • GitLab

• Make File
February • C Basics

• C
March • Mega Exercise

• Advanced c
April-May • Data Structure
12002060501022 GCET 4
1.LINUX

• Understanding of shell
• File Handling
• Linux file system
• Services
• Linux Text Editor
• Shell script

12002060501022 GCET 5
LINUX FILE SYSTEM
• Linux file system has a hierarchal file structure as it contains a root directory and its subdirectories. All other directories
can be accessed from the root directory. A partition usually has only one file system, but it may have more than one file
system.

•/ (root filesystem): It is the top-level filesystem directory. It must include every file needed to boot the Linux system before
another filesystem is mounted. Every other filesystem is mounted on a well-defined and standard mount point because of the
root filesystem directories after the system is started.
•/boot: It includes the static kernel and bootloader configuration and executable files needed to start a Linux computer.
•/bin: This directory includes user executable files.
•/dev: It includes the device file for all hardware devices connected to the system. These aren't device drivers; instead, they are
files that indicate all devices on the system and provide access to these devices.
•/etc: It includes the local system configuration files for the host system.
•/lib: It includes shared library files that are needed to start the system.
•/home: The home directory storage is available for user files. All users have a subdirectory inside /home.

12002060501022 GCET 6
•/mnt: It is a temporary mount point for basic filesystems that can be used at the time when the administrator is working or
repairing a filesystem.

•/media: A place for mounting external removable media devices like USB thumb drives that might be linked to the host.

•/opt: It contains optional files like vendor supplied application programs that must be placed here.

•/root: It's the home directory for a root user. Keep in mind that it's not the '/' (root) file system.

•/tmp: It is a temporary directory used by the OS and several programs for storing temporary files. Also, users may
temporarily store files here. Remember that files may be removed without prior notice at any time in this directory.

12002060501022 GCET 7
UNDERSTANDING OF SHELL
a text-based interface wherein users can enter command names, execute programs, and manipulate files such as file handles,
file permissions, and directories.
Shell is interpreter between terminal and system or kernel .Shell perform all file handling operation using command line
interface.
Shells allow users to communicate efficiently and directly with their operating systems.
• Types of shell
1.Bourne again shell (BASH)
2. KSH
3. C shell
4. Z shell
5. BSH ( Bourne shell)
6. rbash

12002060501022 GCET 8
FILE HANDLING COMMANDS
• Cd : Change the directory.
• Mkdir : Make the new directory.
• Ls : list of directory.
• Mv : Move the file and use for rename.
• Cat : Use for the see the file.
• Pwd : Show the present working directory.
• rm : use for the remove the file.
• Rmdir: Use for the remove the directory.
• Touch : Creating the new file.
• Grep : Highlight specific text.
• Cp : copy the file.

12002060501022 GCET 9
SERVICES
• NFS
• FTP
• SAMBA
• TELNET

12002060501022 GCET 10
VI LINUX EDITOR & SHELL
SCRIPTING

versatile and powerful text editor known for its efficiency and
extensive customization options, operating on the principle of
modal editing with modes like Normal, Insert, Visual, and
Command-Line.is a versatile and powerful text editor known for its
efficiency and extensive customization options, operating on the
principle of modal editing with modes like Normal, Insert, Visual,
and Command-Line.

12002060501022 GCET 11
SHELL SCRIPT
• Shell
• Shell script language
• Variable
• Function
• Execution
• Control loop
• permission

12002060501022 GCET 12
GIT

Git is distributed version control system


Using VCS developers can manage their work history and can
change many developers at time

For git management there is so many commands are there


Git does not allow overwrite each other changes

Git is free and open source .and provided security by SHA1

12002060501022 GCET 13
COMMAND FOR HANDLE GIT
Git clone
Git branch
Git branch checkout
Git add .
Git branch –D <branch name>
Git commit
Git log
Git checkout
Git rm
Git rm –cached
Git diff
Git diff –staged
Git status
Git merge

12002060501022 GCET 14
CI/CD
Ci and cd stand for continuous integration and deployment.
In this we are make one .gitlab-ci.yml in this we are writing the different stages and jobs
Which describe like function

In that all jobs are pipeline means joins each other and test it cases for working or not

Stages > job > test

12002060501022 GCET 15
MAKEFILE

A Make file is a text file used by the make utility in Unix-like


operating systems to automate the compilation and build processes
of software projects.

The primary purpose of a Make file is to define a set of rules and


dependencies for building a software project. It specifies how
source files should be compiled and linked to produce executable
programs or libraries.

12002060501022 GCET 16
MAKE FILE
Make file contain macros and rule which have performed by make . Make is tool which automates the process of compilation
and generates the executables at last .

MAKEFILE:
• Targets
• Dependency
• Commands
• Phony
• Clean

12002060501022 GCET 17
FILE COMPILATION
STAGES
Source file(.c) >>>preprocessing(.i)

Preprocessing(.i) >>> compiler (.s)

Compiler(.s) >>> Assembler (.o)

Assembler(.o) >>> linker(which include library) >>> (.Exe)

12002060501022 GCET 18
C LANGUAGE
Doxygen style commenting
Doxygen is a documentation generation tool used primarily for
documenting source code in various programming languages, including C+
+, C, Java, Python, and more. It parses source code files and generates
documentation in various output formats such as HTML, PDF, LaTeX, and
RTF. Here's an overview of Doxygen

Commands:@param,@return,@class,@page,@subpage….etc. …..nd its


key features:

12002060501022 GCET 19
BASIC C
• Datatypes
• Operators
• Variable scopes
• Storage class
• Type case
• Typedef
• Structure
• union

12002060501022 GCET 20
ARRAY & POINTER

• What is array
• Indexing array
• Memory alignment of array
• Accessing of array element
• Memory alignment of multi dimension array
• What is pointer
• Type of pointer
• Pointer to array
• Pointer to pointer
• Memory layout
• Function pointer
12002060501022 GCET 21
I/O FILE OPERATIONS
File operation is use for the Read and Write in .txt file and in .bin file.
Use for the storing data at program run time or read data from file at requirement in source code.

FILE OPERATIONS:
fopen : open the particular file.
fclose : close the particular file.
fread : Read the data from Binary file.
fwrite : Write the data to Binary file.
fgets : Get the string or lines from .txt file to program storage.
fputs : Puts the lines or string in the .txt file.
fscanf : Formatted way to store the data in program scope.
fprintf : Write the Data in file in formatting way.

12002060501022 GCET 22
LINKING
Linking is process that how to combine the all object file to create .Exe
There is mainly two types .

i)Dynamic
ii) static

i) Dynamic linking in that we are give reference of External or shared library and copy this at run time .
ii) Static linking in that we are copying our External files in the Executable.

Generally Static linking is more efficient in way to run .Exe for faster responses.
While if space concern Dynamic library is useful in that not whole copy of library only we are shared at run time.

12002060501022 GCET 23
CREATION OF LIBRARY
Library is group of pre-compiled codes of function .
We are add Library at Linking stage to add function definition in .Exe

i) Static library creation :


first compiled all source which we have compiled in library
ar rcs library. a <objectfiles>

ii) Dynamic Library Creation :


Compiled all source file with flag –fpic for make position independent code.
gcc <object files> -share –o library.so

12002060501022 GCET 24
ADVANCED C
In this Module I have learned Some topic in More detailed

• Dynamic Memory allocation.


• Valgrind.
• Memory organization and optimization.
• GDB.
• Structured programming.
• interrupts

12002060501022 GCET 25
DYNAMIC MEMORY ALLOCATION
In general, there are two types of storage available for variables. They are
1. Stack and
2. Heap memory storages.

The stack memory is a permanent storage area where the ordinary variables can be stored. The heap memory is the free
memory area available in the main memory of the computer which will be used for dynamic memory allocation.

In C, there exists a set of built-in functions which are used to allocate memory dynamically to the derived data types
like arrays, structures and unions.
Some of the important functions are:
1. malloc ()
2. calloc ()
3. realloc()
4. free ()

12002060501022 GCET 26
Static Memory Allocation Dynamic Memory Allocation

This memory is allocated at compile time. This memory is allocated at run time

Memory allocation can not be modified while executing a program. Memory allocation can be changed while executing the program.

Used in an array. Used in a linked list.

It is fast and saves running time. It is a bit slow.

It allocates memory from the stack. It allocates memory from the heap.

Allocated memory stays till the end of the program. Memory can be allocated at any time and can be released at any time.

It is less efficient than a Dynamic allocation strategy. It is more efficient than a Static allocation strategy.

Implementation is simple. Implementation is complicated

Example: int i; float j; Example: p = malloc(sizeof(int));

12002060501022 GCET 27
VALGRIND

• Valgrind is a powerful tool used for memory debugging, memory leak detection, and profiling in C and other programming
languages. It helps developers identify memory-related errors and improve the stability and reliability of their C programs.
• Memory Error Detection: Valgrind detects memory errors such as invalid memory accesses, uninitialized memory reads,
and memory leaks.
• Memory Leak Detection: It identifies memory leaks by tracking allocated memory blocks that are not properly deallocated
• Heap Profiling: Valgrind can profile heap memory usage, helping developers identify memory allocation patterns and
optimize memory usage.
• Valgrind provides multiple tools (e.g., Memcheck) for specific memory debugging tasks, each with its own set of features
and capabilities.

12002060501022 GCET 28
MEMORY ORGANIZATION

Code segment or text segment: Code segment contains the code executable or code binary.

Data segment: Data segment is sub divided into two parts – Initialized data segment: All the global, static and
constant data are stored in the data segment. – Uninitialized data segment: All the uninitialized data are stored in
BSS.

Heap: When a program allocates memory at runtime using calloc and malloc function, then memory gets allocated
in heap. When some more memory needs to be allocated using calloc and malloc functions, the heap grows upward
as shown in the above diagram.

Stack: Stack is used to store your local variables and is used for passing arguments to the functions along with the
return address of the instruction which is to be executed after the function call is over. When a new stack frame needs
to be added (as a result of a newly called function), the stack grows downward.

12002060501022 GCET 29
OPTIMIZATION
Memory optimization is use for how to make program efficient in terms of memory , execution speed and in term of use of
share resources like CPU cycle ,Memory
In that there two way to optimize code

i)Developer side
ii)compiler side

i) In developer side we are reduce our code using the change the our logic or unrolling the function using loop
using macro programming instead of calling scanf for small logical variables.
ii) In compiler side in that we are provides the flag at compilation time to optimize the code
Example: -o1, -o2,-o3, -of
for the fast compilation or reduce memory occupy in RAM for fast Execution.

12002060501022 GCET 30
GDB
GDB, the GNU Debugger, is a crucial tool for debugging C programs. It provides developers with the ability to analyze
program execution, track variable values, and diagnose errors efficiently.

By enabling interactive debugging, GDB plays a vital role in ensuring the reliability and correctness of C code during the
software development process.
Interactive Debugging: GDB's interactive environment allows developers to pause execution, inspect variables, and step
through code, facilitating efficient bug identification.
Variable Inspection: Developers can examine variable values, aiding in identifying incorrect values and pinpointing errors.

Backtrace Analysis: GDB provides function call backtraces, helping developers trace execution flow and understand the
sequence of function calls leading to errors.
Breakpoints: GDB allows setting breakpoints at specific code locations, halting execution for inspection, and targeted
debugging

12002060501022 GCET 31
Num Command Description

1 run Start executing the program.

2 break <line> Set a breakpoint at a specific line.

3 break <func> Set a breakpoint at the beginning of a function.

4 continue Continue execution until the next breakpoint or the end.

5 next Execute the next line of code (step over function calls).

6 step Execute the next line of code (step into function calls).

7 print <var> Print the value of a variable.

8 quite Exit GDB.

12002060501022 GCET 32
STRUCTURED PROGRAMMING
In the field of computer programming, structured programming serves as a fundamental methodology that emphasizes the
organization of code into clear, logical structures.
It aims to enhance code readability, maintainability, and efficiency by avoiding unstructured constructs like goto statements
and promoting the use of control structures like loops and conditionals.
In structured programming, the code is organized into functions or modules, fostering better code organization and easier
comprehension

What is OOP:
Object-Oriented Programming (OOP) is a programming paradigm that revolves around the concept of objects, which are
instances of classes. OOP emphasizes encapsulation, inheritance, and polymorphism

12002060501022 GCET 33
Encapsulation: Encapsulation refers to the bundling of data (attributes or properties) and methods
(functions or procedures) that operate on the data within a single unit or class. It hides the internal state
of an object and only exposes the necessary functionalities.

Inheritance: Inheritance allows a class (subclass) to inherit properties and behaviors from another class
(superclass). This promotes code reuse and establishes an "is-a" relationship between classes.

Polymorphism: Polymorphism allows objects of different classes to be treated as objects of a common


superclass. It enables the same method to behave differently based on the object it is called upon,
facilitating flexibility and extensibility in code

12002060501022 GCET 34
struct object {
float a; // Dimension of the object
float b; // Additional dimension (if applicable)
float (*area)(struct object*); // Function pointer to calculate area
};

//AREA FUNCTIONS FOR ALL THE SHAPES

float Rect_area(struct object *obj) { return obj->a * obj->b; }

float Squa_area(struct object *obj) { return obj->a * obj->a; }

float Circ_area(struct object *obj) { return PI * (obj->a * obj->a); }

float Tria_area(struct object *obj) { return (0.5 * obj->a * obj->b); }

12002060501022 GCET 35
INTERRUPTS

To facilitate signal handling within our program, we include the necessary header file, signal.h. The following
lines designate my handler to manage the SIGINT signal, which is triggered by pressing Ctrl+C, and
quit_handler to handle the SIGQUIT signal, activated by pressing Ctrl+/.

signal(SIGINT,my_handler); //SIGINT for ctrl+c

signal(SIGQUIT,quit_handler); //SIGQUIT for ctrl+/

12002060501022 GCET 36
LINKED LIST
• Linked list is data structure which is use for the Create Node And connect it using the reference of next Node
• Linked list use for Insertion of any Data between list while is not easily possible in array because in that we have to shift all
data after that we can add the data in array.
• Linked use when we don’t require contiguous or contiguous Memory is not available
• Is take more memory and time for Accessing data in linked list

Operations:
i) Insertion at any index
ii) Deletion at any index
iii) Reverse , Size

Type: Singly, Doubly ,Circular

12002060501022 GCET 37
FOOD SYSTEM
In this I was made one Modular code for application like Zomato or others online food application works
Functions:
i) login & signup
ii) Create Hotel List
iii) create Hotel Menu for all Respective Hotels.
iv) Select Hotel and select items and continue select with another Hotel also
v) Make total of all Items Which Is selected.
vi) Generates The Bill with particular discounts( In My case I take 10% discount on Total >300)

12002060501022 GCET 38
Q&A

12002060501022 GCET 39
Thank You

12002060501022 GCET 40

You might also like