ACKNOWLEDGEMENT 
I have taken efforts in this training. However, it would not have been possible without the 
kind support and help of many individuals and organizations. I would like to extend my 
sincere thanks to all of them. 
I am highly indebted to Technology Uncorked staff for their guidance and constant 
supervision as well as for providing necessary information regarding the topics & also for 
their support in completing the training. 
I would like to express my gratitude towards my parents & member of NIIT for their kind co-operation 
and encouragement which help me in completion of this project. 
I would like to express my special gratitude and thanks to industry persons for giving me such 
attention and time. 
My thanks and appreciations also go to my colleague in completing the training and people 
who have willingly helped me out with their abilities. 
Mithlesh kumar 
11111223 
7th Semester 4th year
PREFACE 
What is Linux? 
Linux or, less frequently used, is a Unix-like and mostly POSIX-compliant computer 
operating system assembled under the model of free and open-source software development 
and distribution. The defining component of Linux is the Linux kernel, an operating system 
kernel first released on 5 October 1991 by Linus Torvalds. 
Linux was originally developed as a free operating system for Intel x86-based personal 
computers. It has since been ported to more computer hardware platforms than any other 
operating system. It is a leading operating system on servers and other big iron systems such 
as mainframe computers and supercomputers. As of June 2013, more than 95% of the 
world's 500 fastest supercomputers run some variant of Linux, including all the 44 
fastest. Linux also runs on embedded systems, which are devices whose operating system is 
typically built into the firmware and is highly tailored to the system; this includes mobile 
phones, tablet computers, network routers, facility automation controls, televisions and video 
game consoles. Android, which is a widely used operating system for mobile devices, is built 
on top of the Linux kernel. 
The development of Linux is one of the most prominent examples of free and open-source 
software collaboration. The underlying source code may be used, modified, and distributed— 
commercially or non-commercially—by anyone under licenses such as the GNU General 
Public License. Typically, Linux is packaged in a format known as a Linux distribution for 
desktop and server use. Some popular mainstream Linux distributions 
include Debian, Ubuntu, Linux Mint, Fedora, opensUSE, Arch Linux, and the 
commercial Red Hat Enterprise Linux and SUSE Linux Enterprise Server. Linux distributions 
include the Linux kernel, supporting utilities and libraries and usually a large amount of 
application software to fulfill the distribution's intended use. 
A distribution oriented toward desktop use will typically include X11, Wayland or Mir as 
the windowing system, and an accompanying desktop environment such as GNOME or 
the KDE Software Compilation. Some such distributions may include a less resource 
intensive desktop such as LXDE or Xfce, for use on older or less powerful computers. A 
distribution intended to run as a server may omit all graphical environments from the standard 
install, and instead include other software to set up and operate a solution stack such 
as LAMP. Because Linux is freely redistributable, anyone may create a distribution for any 
intended use.
What is “C”? 
“C” is a general-purpose programming language initially developed by Dennis 
Ritchie between 1969 and 1973 at AT&T Bell Labs. Like most imperative languages in 
the ALGOL tradition, C has facilities for structured programming and allows lexical variable 
scope and recursion, while a static type system prevents many unintended operations. Its 
design provides constructs that map efficiently to typical machine instructions, and therefore 
it has found lasting use in applications that had formerly been coded in assembly language, 
most notably system software like the Unix computer operating system. 
C is one of the most widely used programming languages of all time, and C compilers are 
available for the majority of available computer architectures and operating systems. 
Many later languages have borrowed directly or indirectly from C, 
including D, Go, Rust, Java, JavaScript, Limbo, LPC, C#,ObjectiveC, Perl, PHP, Python, Ver 
ilog (hardware description language), and UNIX’s C shell. These languages have drawn many 
of their control structures and other basic features from C. Most of them (with Python being 
the most dramatic exception) are also very syntactically similar to C in general, and they tend 
to combine the recognizable expression and statement syntax of C with underlying type 
systems, data models, and semantics that can be radically different. C++ and Objective-C 
started as compilers that generated C code; C++ is currently nearly a superset of 
C, while Objective-C is a strict superset of C. 
Before there was an official standard for C, many users and implementers relied on an 
informal specification contained in a book by Dennis Ritchie and Brian Kernighan; that 
version is generally referred to as "K&R" C. In 1989 the American National Standards 
Institute published a standard for C (generally called "ANSI C" or "C89"). The next year, the 
same specification was approved by the International Organization for Standardization as an 
international standard (generally called "C90"). ISO later released an extension to 
the internationalization support of the standard in 1995, and a revised standard (known as 
"C99") in 1999. The current version of the standard (now known as "C11") was approved in 
December 2011. 
What is Embedded C? 
Embedded C is a set of language extensions for the C Programming language by the C 
Standards committee to address commonality issues that exist between C extensions for 
different embedded systems. Historically, embedded C programming requires nonstandard 
extensions to the C language in order to support exotic features such as fixed-point arithmetic, 
multiple distinct memory banks, and basic I/O operations.
In 2008, the C Standards Committee extended the C language to address these issues by 
providing a common standard for all implementations to adhere to. It includes a number of 
features not available in normal C, such as, fixed-point arithmetic, named address spaces, and 
basic I/O hardware addressing. 
Embedded C uses most of the syntax and semantics of standard C, e.g., main() function, 
variable definition, data type declaration, conditional statements (if, switch, case), loops 
(while, for), functions, arrays and strings, structures and union, bit operations, macros, etc. 
A Technical Report was published in 2004] and a second revision in 2006. 
Difference between C and Embedded C 
Though C and embedded C appear different and are used in different contexts, they have 
more similarities than the differences. Most of the constructs are same; the difference lies in 
their applications. 
 C is used for desktop computers, while embedded C is for microcontroller based 
applications. 
 C takes more resources of a desktop PC like memory, OS, etc. while programming on 
desktop systems what embedded C cannot. Embedded C has to use the limited resources 
(RAM, ROM, I/O) on an embedded processor. Thus, program code must fit into the 
available program memory. If code exceeds the limit, the system is likely to crash. 
 Compilers for C (ANSI C) typically generate OS dependent executable files. Embedded 
C requires compilers to create files to be downloaded to the 
microcontrollers/microprocessors where it needs to run. Embedded compilers give access 
to all resources which is not provided in compilers for desktop computer applications. 
 Embedded systems often have the real-time constraints, which is usually not there with 
desktop computer applications. 
 Embedded systems often do not have a console, which is available in case of desktop 
applications.
INTRODUCTION OF THE ORGANIZATION 
NIIT is a leading Global Talent Development Corporation, building skilled manpower pool 
for global industry requirements. The company which was set up in 1981, to help the nascent 
IT industry overcome its human resource challenges, has today grown to be amongst world’s 
leading talent development companies offering learning solutions to Individuals, Enterprises 
and Institutions across 40 countries. Leading IT journal Dataquest has conferred upon NIIT 
the ‘Top IT Training Company’ award successively for the past 20 years, since the inception 
of this category. 
NIIT’s training solutions in IT, Banking, Finance and Insurance, Knowledge Process 
Outsourcing (KPO), Business Process Management (BPM), Executive Management 
Education, Vocational Skills, School Learning Solutions and Communication and 
Professional Life Skills has impacted over 35 million learners since inception. NIIT’s 
expertise in learning content development, training delivery and education process 
management make it the most preferred training partner, worldwide. 
NIIT has introduced “India's first Cloud Campus” , through its new-age GNIIT program. NIIT 
offers training programs in IT, Banking, Global Finance, Management, Digital & Social 
Media Marketing, through its NIIT Cloud Campus with innovative learning features, to make 
students first day-first hour industry ready professionals. Cloud Campus offers students 
higher mobility as they can access their courseware using Netbooks and connect seamlessly to 
NIIT’s Cloud Campus network. NIIT Careers@Campus, the company’s Institutional 
Alliances Business for colleges and Universities, delivers in-campus training through 
Synchronous Learning Technology. 
NIIT Careers@Campus Advantage: 
 Enhanced employability through results driven training 
 Cost-effective learning inside campus 
 Opportunity to learn from expert trainers 
 Placement services upon graduation 
 Online Assessments and Certification 
 Benefits from tech alliances partners 
 Web services for student engagement
LIST OF TABLES 
 Linux vs. Windows 3 - 6 
 Linux Commands 12 - 17 
 Numerical Permissions 18 – 19 
 Symbolic Modes 19 – 20 
 Symbolic Examples 21 – 22 
 System Call 23 
 C Library Functions 48 
LIST OF FIGURES 
 OS Layers 6 
 Need of Network 58 
 Linear bus topology 61 
 Star topology 62 
 Tree topology 63
CONTENTS 
Chapter – 1 
Linux 
 Operating System 1 - 3 
 Linux vs. Windows 3 - 6 
 OS Layers 7 - 9 
 Linux Commands 10 - 17 
 File Permissions – “chmod” 17 - 23 
 Shell Scripting 23 - 27 
 Process Management 27 - 28 
Chapter – 2 
C Language 
 Compilation and Execution 29 - 30 
 Data Types 30 - 39 
 Constants and Variables 39 – 42 
 Arrays in C 42 - 46 
Chapter – 3 
Embedded C 
 Functions 47 - 48 
 Unions 48 - 51 
 Structures 51 - 54 
 C Preprocessor 54 - 58 
 Microcontroller 58 - 59 
 Embedded Design 59 – 61 
Chapter – 4 
Communication And Network Concepts
 Network 58-59 
 Switching Techniques 59-60 
 Transmission media 60-61 
 Different topologies 61-64 
Conclusion 62 
Bibliography 63

training report pages

  • 1.
    ACKNOWLEDGEMENT I havetaken efforts in this training. However, it would not have been possible without the kind support and help of many individuals and organizations. I would like to extend my sincere thanks to all of them. I am highly indebted to Technology Uncorked staff for their guidance and constant supervision as well as for providing necessary information regarding the topics & also for their support in completing the training. I would like to express my gratitude towards my parents & member of NIIT for their kind co-operation and encouragement which help me in completion of this project. I would like to express my special gratitude and thanks to industry persons for giving me such attention and time. My thanks and appreciations also go to my colleague in completing the training and people who have willingly helped me out with their abilities. Mithlesh kumar 11111223 7th Semester 4th year
  • 2.
    PREFACE What isLinux? Linux or, less frequently used, is a Unix-like and mostly POSIX-compliant computer operating system assembled under the model of free and open-source software development and distribution. The defining component of Linux is the Linux kernel, an operating system kernel first released on 5 October 1991 by Linus Torvalds. Linux was originally developed as a free operating system for Intel x86-based personal computers. It has since been ported to more computer hardware platforms than any other operating system. It is a leading operating system on servers and other big iron systems such as mainframe computers and supercomputers. As of June 2013, more than 95% of the world's 500 fastest supercomputers run some variant of Linux, including all the 44 fastest. Linux also runs on embedded systems, which are devices whose operating system is typically built into the firmware and is highly tailored to the system; this includes mobile phones, tablet computers, network routers, facility automation controls, televisions and video game consoles. Android, which is a widely used operating system for mobile devices, is built on top of the Linux kernel. The development of Linux is one of the most prominent examples of free and open-source software collaboration. The underlying source code may be used, modified, and distributed— commercially or non-commercially—by anyone under licenses such as the GNU General Public License. Typically, Linux is packaged in a format known as a Linux distribution for desktop and server use. Some popular mainstream Linux distributions include Debian, Ubuntu, Linux Mint, Fedora, opensUSE, Arch Linux, and the commercial Red Hat Enterprise Linux and SUSE Linux Enterprise Server. Linux distributions include the Linux kernel, supporting utilities and libraries and usually a large amount of application software to fulfill the distribution's intended use. A distribution oriented toward desktop use will typically include X11, Wayland or Mir as the windowing system, and an accompanying desktop environment such as GNOME or the KDE Software Compilation. Some such distributions may include a less resource intensive desktop such as LXDE or Xfce, for use on older or less powerful computers. A distribution intended to run as a server may omit all graphical environments from the standard install, and instead include other software to set up and operate a solution stack such as LAMP. Because Linux is freely redistributable, anyone may create a distribution for any intended use.
  • 3.
    What is “C”? “C” is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs. Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. Its design provides constructs that map efficiently to typical machine instructions, and therefore it has found lasting use in applications that had formerly been coded in assembly language, most notably system software like the Unix computer operating system. C is one of the most widely used programming languages of all time, and C compilers are available for the majority of available computer architectures and operating systems. Many later languages have borrowed directly or indirectly from C, including D, Go, Rust, Java, JavaScript, Limbo, LPC, C#,ObjectiveC, Perl, PHP, Python, Ver ilog (hardware description language), and UNIX’s C shell. These languages have drawn many of their control structures and other basic features from C. Most of them (with Python being the most dramatic exception) are also very syntactically similar to C in general, and they tend to combine the recognizable expression and statement syntax of C with underlying type systems, data models, and semantics that can be radically different. C++ and Objective-C started as compilers that generated C code; C++ is currently nearly a superset of C, while Objective-C is a strict superset of C. Before there was an official standard for C, many users and implementers relied on an informal specification contained in a book by Dennis Ritchie and Brian Kernighan; that version is generally referred to as "K&R" C. In 1989 the American National Standards Institute published a standard for C (generally called "ANSI C" or "C89"). The next year, the same specification was approved by the International Organization for Standardization as an international standard (generally called "C90"). ISO later released an extension to the internationalization support of the standard in 1995, and a revised standard (known as "C99") in 1999. The current version of the standard (now known as "C11") was approved in December 2011. What is Embedded C? Embedded C is a set of language extensions for the C Programming language by the C Standards committee to address commonality issues that exist between C extensions for different embedded systems. Historically, embedded C programming requires nonstandard extensions to the C language in order to support exotic features such as fixed-point arithmetic, multiple distinct memory banks, and basic I/O operations.
  • 4.
    In 2008, theC Standards Committee extended the C language to address these issues by providing a common standard for all implementations to adhere to. It includes a number of features not available in normal C, such as, fixed-point arithmetic, named address spaces, and basic I/O hardware addressing. Embedded C uses most of the syntax and semantics of standard C, e.g., main() function, variable definition, data type declaration, conditional statements (if, switch, case), loops (while, for), functions, arrays and strings, structures and union, bit operations, macros, etc. A Technical Report was published in 2004] and a second revision in 2006. Difference between C and Embedded C Though C and embedded C appear different and are used in different contexts, they have more similarities than the differences. Most of the constructs are same; the difference lies in their applications.  C is used for desktop computers, while embedded C is for microcontroller based applications.  C takes more resources of a desktop PC like memory, OS, etc. while programming on desktop systems what embedded C cannot. Embedded C has to use the limited resources (RAM, ROM, I/O) on an embedded processor. Thus, program code must fit into the available program memory. If code exceeds the limit, the system is likely to crash.  Compilers for C (ANSI C) typically generate OS dependent executable files. Embedded C requires compilers to create files to be downloaded to the microcontrollers/microprocessors where it needs to run. Embedded compilers give access to all resources which is not provided in compilers for desktop computer applications.  Embedded systems often have the real-time constraints, which is usually not there with desktop computer applications.  Embedded systems often do not have a console, which is available in case of desktop applications.
  • 5.
    INTRODUCTION OF THEORGANIZATION NIIT is a leading Global Talent Development Corporation, building skilled manpower pool for global industry requirements. The company which was set up in 1981, to help the nascent IT industry overcome its human resource challenges, has today grown to be amongst world’s leading talent development companies offering learning solutions to Individuals, Enterprises and Institutions across 40 countries. Leading IT journal Dataquest has conferred upon NIIT the ‘Top IT Training Company’ award successively for the past 20 years, since the inception of this category. NIIT’s training solutions in IT, Banking, Finance and Insurance, Knowledge Process Outsourcing (KPO), Business Process Management (BPM), Executive Management Education, Vocational Skills, School Learning Solutions and Communication and Professional Life Skills has impacted over 35 million learners since inception. NIIT’s expertise in learning content development, training delivery and education process management make it the most preferred training partner, worldwide. NIIT has introduced “India's first Cloud Campus” , through its new-age GNIIT program. NIIT offers training programs in IT, Banking, Global Finance, Management, Digital & Social Media Marketing, through its NIIT Cloud Campus with innovative learning features, to make students first day-first hour industry ready professionals. Cloud Campus offers students higher mobility as they can access their courseware using Netbooks and connect seamlessly to NIIT’s Cloud Campus network. NIIT Careers@Campus, the company’s Institutional Alliances Business for colleges and Universities, delivers in-campus training through Synchronous Learning Technology. NIIT Careers@Campus Advantage:  Enhanced employability through results driven training  Cost-effective learning inside campus  Opportunity to learn from expert trainers  Placement services upon graduation  Online Assessments and Certification  Benefits from tech alliances partners  Web services for student engagement
  • 6.
    LIST OF TABLES  Linux vs. Windows 3 - 6  Linux Commands 12 - 17  Numerical Permissions 18 – 19  Symbolic Modes 19 – 20  Symbolic Examples 21 – 22  System Call 23  C Library Functions 48 LIST OF FIGURES  OS Layers 6  Need of Network 58  Linear bus topology 61  Star topology 62  Tree topology 63
  • 7.
    CONTENTS Chapter –1 Linux  Operating System 1 - 3  Linux vs. Windows 3 - 6  OS Layers 7 - 9  Linux Commands 10 - 17  File Permissions – “chmod” 17 - 23  Shell Scripting 23 - 27  Process Management 27 - 28 Chapter – 2 C Language  Compilation and Execution 29 - 30  Data Types 30 - 39  Constants and Variables 39 – 42  Arrays in C 42 - 46 Chapter – 3 Embedded C  Functions 47 - 48  Unions 48 - 51  Structures 51 - 54  C Preprocessor 54 - 58  Microcontroller 58 - 59  Embedded Design 59 – 61 Chapter – 4 Communication And Network Concepts
  • 8.
     Network 58-59  Switching Techniques 59-60  Transmission media 60-61  Different topologies 61-64 Conclusion 62 Bibliography 63