C programming is a widely used programming language. The document provides an overview of key concepts in C programming including variables, data types, operators, decision and loop control statements, functions, pointers, arrays, strings, structures, and input/output functions. It also provides examples to illustrate concepts like arrays, strings, functions, pointers, and structures. The main function is the entry point for all C programs where code execution begins.
This document provides an overview of C programming basics including character sets, tokens, keywords, variables, data types, and control statements in C language. Some key points include:
- The C character set includes lowercase/uppercase letters, digits, special characters, whitespace, and escape sequences.
- Tokens in C include operators, special symbols, string constants, identifiers, and keywords. There are 32 reserved keywords that should be in lowercase.
- Variables are named locations in memory that hold values. They are declared with a data type and initialized by assigning a value.
- C has primary data types like int, float, char, and double. Derived types include arrays, pointers, unions, structures,
This document discusses decision and loop control in C programming. It covers if, if-else, conditional operators, relational operators, logical operators, the conditional operator (? :) and various loops including while, do-while and for loops. Examples are provided to demonstrate the use of if/else, logical operators, conditional operators and while, do-while loops. Flowcharts are also included to illustrate program flow. The document is presented by Vinay Arora and covers basic conditional and loop control structures in C.
The document discusses the basics of C language including tokens, data types, constants, and variables. It covers keywords, identifiers, operators, and other tokens in C. It describes the basic integral and floating point data types like int, char, float, and double. It also discusses numerical, character, and string constants. Finally, it explains how to declare variables and the differences between global and local variables.
The document discusses input and output functions in C programming. It describes getchar() and putchar() for character input/output, printf() and scanf() for formatted input/output, and gets() and puts() for string input/output. It provides examples of using these functions to read input from the keyboard and display output to the screen.
This chapter discusses fundamental concepts of C programming language and basic input/output functions. It covers C development environment, C program structure including main functions and statements, basic data types, input/output functions like printf and scanf, and common programming errors.
The document discusses various operators and control structures in C language. It describes operator precedence and associativity. Some key operator types include arithmetic, relational, logical, and bitwise operators. It also covers various control structures like if-else, switch statements, and loops (for, while, do-while). If-else is used to execute code conditionally based on true/false evaluations. Switch allows executing code based on multiple conditions. Loops iterate code for a set number of times or until a condition becomes false.
1. There are two main ways to handle input-output in C - formatted functions like printf() and scanf() which require format specifiers, and unformatted functions like getchar() and putchar() which work only with characters.
2. Formatted functions allow formatting of different data types like integers, floats, and strings. Unformatted functions only work with characters.
3. Common formatted functions include printf() for output and scanf() for input. printf() outputs data according to format specifiers, while scanf() reads input and stores it in variables based on specifiers.
The document contains 40 multiple choice questions related to computer science class 12. It covers topics like variables, data types, operators, loops, functions, arrays and more. The questions test concepts like escape sequences, format specifiers, assignment operators, comments, input/output functions, and the difference between various loops in C programming language. It is a practice test to help students prepare for their computer science exam.
It is an attempt to make the students of IT understand the basics of programming in C in a simple and easy way. Send your feedback for rectification/further development.
Important C program of Balagurusamy BookAbir Hossain
This document contains summaries of multiple programming labs involving different programming concepts like functions, arrays, strings, conditionals, loops, etc. The labs cover basics like printing an address, calculating expressions, finding roots of equations, computing trigonometric functions; conditionals like determining if a number is even/odd, larger/smaller; functions including calculating factorial, power series, fibonacci series; arrays for storing student marks, vote counting; strings for manipulation and analysis.
Programming is an essential skill if you seek a career in software development, or in other fields of Coding. This fundamental of programming course is the first in the specialization for Introduction to Programming in C, but its lessons extend to any language you might want to study. This is because programming is primarily about solving a set of problems and writing the algorithm.
This document discusses using switch-case statements in C programming to perform mathematical operations. It provides the syntax for switch-case, an example of a program that takes two numbers and an operator as input to perform addition, subtraction, multiplication and division. The program is presented along with its flowchart and algorithm. The learning objectives are to write switch-case syntax, draw flowcharts, write algorithms and programs using switch-case statements.
This document provides an overview of the C programming language. It covers various C language concepts like data types, operators, control structures, arrays, strings, functions and more. The document is divided into 9 sections with each section covering a specific C concept. For example, section 1 provides an introduction to C including its history, the difference between compilers and interpreters. Section 2 covers data types, constants and variables in C. Section 3 discusses operators and expressions. Section 4 explains various control structures like if-else, switch case etc. Section 5 is about looping constructs like while, do-while and for loops. Section 6 demonstrates looping with patterns. Section 7 describes arrays in C including 1D and 2D arrays. Section 8 covers
The document discusses various C programming concepts including data types, variables, constants, and input/output functions. It covers fundamental data types like integers, floats, characters, and derived types like arrays, pointers, and structures. It also explains variable declaration syntax, integer and floating point input/output, and arithmetic, relational, logical, and conditional operators.
C is a middle-level general purpose programming language developed in 1972. It uses characters, keywords, variables, constants, data types, expressions and operators. Variables are named locations used to store and manipulate data during execution. C supports several data types including integer, float, character and others. Operators perform actions like arithmetic, relational, logical and bitwise operations on variables and constants.
Constants Variables Datatypes by Mrs. Sowmya JyothiSowmyaJyothi3
C provides various data types to store different types of data. The main data types are integer, float, double, and char. Variables are used to store and manipulate data in a program. Variables must be declared before use, specifying the data type. Constants are fixed values that don't change, and can be numeric, character, or string values. Symbolic constants can be defined to represent constant values used throughout a program. Input and output of data can be done using functions like scanf and printf.
This document provides instructions for writing a C program to count the vowels, consonants, digits, and whitespace in a string. It begins by explaining how to declare, initialize, read, and manipulate strings in C. It then presents the algorithm and full C program to iterate through a string, check each character, and increment the appropriate counter. The program takes a string as input and outputs the count of each type of character. Examples of additional string programs are provided for practice.
The document discusses C programming concepts related to decision control statements like if, if-else, else-if ladder, and nested if-else. It provides examples of code and flowcharts for programs using each type of decision statement to check conditions and display outputs. The document is divided into multiple sections for each decision statement type, with theory, an example program, inputs/outputs, and practice problems in each section.
This document contains notes from a lecture on C programming. It introduces basic C concepts like data types, operators, input/output functions, and provides examples of simple C programs. It also discusses compiling and executing C code, precedence rules for operators, and homework problems involving increment operators. The lecture aims to recap basic C knowledge and provide more in-depth coverage of topics like data types, arithmetic operations, and I/O functions.
The document discusses three-address code, which is an intermediate representation used in compilers. It describes three-address code as consisting of statements in the form of x := y op z, where x, y, and z are operands and op is an operator. There are several types of three-address statements including assignment, copy, jump, conditional jump, procedure calls, indexed assignments, and pointer assignments. Three-address code can be implemented using quadruples, triples, or indirect triples, which represent the statements using records with fields for operands and operators.
The document discusses input and output functions in C programming, specifically covering the printf and scanf functions. It explains how printf works by taking a format string and values to insert, and how scanf works by reading input according to a format string and storing the values in variables. Special format specifiers, escape sequences, and handling errors are also covered.
The document provides information on the C programming language. It discusses that C was developed by Dennis Ritchie at Bell Labs in 1972 and is a general purpose programming language well suited for business and scientific applications. It describes the basic structure of a C program including sections for links, definitions, variables, functions, and input/output statements. It also covers various C language concepts like data types, operators, decision making statements, looping statements, functions, and more.
pointer, structure ,union and intro to file handlingRai University
Pointers allow programs to store and pass around memory addresses. Pointers in C can point to primitive data types, arrays, structs, and other pointers. Declaring a pointer requires a * before the pointer name and specifying the type of data it will point to. The & operator returns the memory address of a variable, which can be stored in a pointer. The * operator dereferences a pointer to access the data being pointed to. Pointers enable functions to modify variables in the calling function and return multiple values. They also make structs more efficient to pass to functions. Care must be taken to avoid bugs from misusing pointers.
Este documento fornece um tutorial passo-a-passo para criar um jogo de palavras-cruzadas no LibreOffice Calc. Ele explica como formatar células, adicionar perguntas, proteger a planilha e editar o jogo de palavras-cruzadas. O objetivo é demonstrar como integrar as TICs em atividades educativas usando o editor de planilhas eletrônicas.
This document provides an operational assessment for Mantra-care, a plastic surgery clinic for men. It summarizes Mantra-care's marketing plan and economic analysis, outlines its objectives and strategies, and analyzes factors that could affect its output such as staff skill levels, processes, and resources. The assessment also examines Mantra-care's supply chain and potential problems and solutions related to capacity, quality, and achieving its strategic goals.
The document summarizes the construction of the Gautam Buddha International Circuit racing track in India. Key details include:
- Over 4 million cubic tons of earth was moved and 325,000 tons of asphalt was used to construct the 5.1 km track with 16 turns.
- Construction involved laying 5 layers of materials to support heavy racing cars at high speeds. A mixing plant 5 km away produced the asphalt.
- A main grandstand was built with 30m height, 138m length, 56 steel trusses weighing 40 tons each, and a 40m cantilever roof with 50,000 sqm of aluminum sheeting.
- Sophisticated safety barriers and 450
1. There are two main ways to handle input-output in C - formatted functions like printf() and scanf() which require format specifiers, and unformatted functions like getchar() and putchar() which work only with characters.
2. Formatted functions allow formatting of different data types like integers, floats, and strings. Unformatted functions only work with characters.
3. Common formatted functions include printf() for output and scanf() for input. printf() outputs data according to format specifiers, while scanf() reads input and stores it in variables based on specifiers.
The document contains 40 multiple choice questions related to computer science class 12. It covers topics like variables, data types, operators, loops, functions, arrays and more. The questions test concepts like escape sequences, format specifiers, assignment operators, comments, input/output functions, and the difference between various loops in C programming language. It is a practice test to help students prepare for their computer science exam.
It is an attempt to make the students of IT understand the basics of programming in C in a simple and easy way. Send your feedback for rectification/further development.
Important C program of Balagurusamy BookAbir Hossain
This document contains summaries of multiple programming labs involving different programming concepts like functions, arrays, strings, conditionals, loops, etc. The labs cover basics like printing an address, calculating expressions, finding roots of equations, computing trigonometric functions; conditionals like determining if a number is even/odd, larger/smaller; functions including calculating factorial, power series, fibonacci series; arrays for storing student marks, vote counting; strings for manipulation and analysis.
Programming is an essential skill if you seek a career in software development, or in other fields of Coding. This fundamental of programming course is the first in the specialization for Introduction to Programming in C, but its lessons extend to any language you might want to study. This is because programming is primarily about solving a set of problems and writing the algorithm.
This document discusses using switch-case statements in C programming to perform mathematical operations. It provides the syntax for switch-case, an example of a program that takes two numbers and an operator as input to perform addition, subtraction, multiplication and division. The program is presented along with its flowchart and algorithm. The learning objectives are to write switch-case syntax, draw flowcharts, write algorithms and programs using switch-case statements.
This document provides an overview of the C programming language. It covers various C language concepts like data types, operators, control structures, arrays, strings, functions and more. The document is divided into 9 sections with each section covering a specific C concept. For example, section 1 provides an introduction to C including its history, the difference between compilers and interpreters. Section 2 covers data types, constants and variables in C. Section 3 discusses operators and expressions. Section 4 explains various control structures like if-else, switch case etc. Section 5 is about looping constructs like while, do-while and for loops. Section 6 demonstrates looping with patterns. Section 7 describes arrays in C including 1D and 2D arrays. Section 8 covers
The document discusses various C programming concepts including data types, variables, constants, and input/output functions. It covers fundamental data types like integers, floats, characters, and derived types like arrays, pointers, and structures. It also explains variable declaration syntax, integer and floating point input/output, and arithmetic, relational, logical, and conditional operators.
C is a middle-level general purpose programming language developed in 1972. It uses characters, keywords, variables, constants, data types, expressions and operators. Variables are named locations used to store and manipulate data during execution. C supports several data types including integer, float, character and others. Operators perform actions like arithmetic, relational, logical and bitwise operations on variables and constants.
Constants Variables Datatypes by Mrs. Sowmya JyothiSowmyaJyothi3
C provides various data types to store different types of data. The main data types are integer, float, double, and char. Variables are used to store and manipulate data in a program. Variables must be declared before use, specifying the data type. Constants are fixed values that don't change, and can be numeric, character, or string values. Symbolic constants can be defined to represent constant values used throughout a program. Input and output of data can be done using functions like scanf and printf.
This document provides instructions for writing a C program to count the vowels, consonants, digits, and whitespace in a string. It begins by explaining how to declare, initialize, read, and manipulate strings in C. It then presents the algorithm and full C program to iterate through a string, check each character, and increment the appropriate counter. The program takes a string as input and outputs the count of each type of character. Examples of additional string programs are provided for practice.
The document discusses C programming concepts related to decision control statements like if, if-else, else-if ladder, and nested if-else. It provides examples of code and flowcharts for programs using each type of decision statement to check conditions and display outputs. The document is divided into multiple sections for each decision statement type, with theory, an example program, inputs/outputs, and practice problems in each section.
This document contains notes from a lecture on C programming. It introduces basic C concepts like data types, operators, input/output functions, and provides examples of simple C programs. It also discusses compiling and executing C code, precedence rules for operators, and homework problems involving increment operators. The lecture aims to recap basic C knowledge and provide more in-depth coverage of topics like data types, arithmetic operations, and I/O functions.
The document discusses three-address code, which is an intermediate representation used in compilers. It describes three-address code as consisting of statements in the form of x := y op z, where x, y, and z are operands and op is an operator. There are several types of three-address statements including assignment, copy, jump, conditional jump, procedure calls, indexed assignments, and pointer assignments. Three-address code can be implemented using quadruples, triples, or indirect triples, which represent the statements using records with fields for operands and operators.
The document discusses input and output functions in C programming, specifically covering the printf and scanf functions. It explains how printf works by taking a format string and values to insert, and how scanf works by reading input according to a format string and storing the values in variables. Special format specifiers, escape sequences, and handling errors are also covered.
The document provides information on the C programming language. It discusses that C was developed by Dennis Ritchie at Bell Labs in 1972 and is a general purpose programming language well suited for business and scientific applications. It describes the basic structure of a C program including sections for links, definitions, variables, functions, and input/output statements. It also covers various C language concepts like data types, operators, decision making statements, looping statements, functions, and more.
pointer, structure ,union and intro to file handlingRai University
Pointers allow programs to store and pass around memory addresses. Pointers in C can point to primitive data types, arrays, structs, and other pointers. Declaring a pointer requires a * before the pointer name and specifying the type of data it will point to. The & operator returns the memory address of a variable, which can be stored in a pointer. The * operator dereferences a pointer to access the data being pointed to. Pointers enable functions to modify variables in the calling function and return multiple values. They also make structs more efficient to pass to functions. Care must be taken to avoid bugs from misusing pointers.
Este documento fornece um tutorial passo-a-passo para criar um jogo de palavras-cruzadas no LibreOffice Calc. Ele explica como formatar células, adicionar perguntas, proteger a planilha e editar o jogo de palavras-cruzadas. O objetivo é demonstrar como integrar as TICs em atividades educativas usando o editor de planilhas eletrônicas.
This document provides an operational assessment for Mantra-care, a plastic surgery clinic for men. It summarizes Mantra-care's marketing plan and economic analysis, outlines its objectives and strategies, and analyzes factors that could affect its output such as staff skill levels, processes, and resources. The assessment also examines Mantra-care's supply chain and potential problems and solutions related to capacity, quality, and achieving its strategic goals.
The document summarizes the construction of the Gautam Buddha International Circuit racing track in India. Key details include:
- Over 4 million cubic tons of earth was moved and 325,000 tons of asphalt was used to construct the 5.1 km track with 16 turns.
- Construction involved laying 5 layers of materials to support heavy racing cars at high speeds. A mixing plant 5 km away produced the asphalt.
- A main grandstand was built with 30m height, 138m length, 56 steel trusses weighing 40 tons each, and a 40m cantilever roof with 50,000 sqm of aluminum sheeting.
- Sophisticated safety barriers and 450
This document provides an overview of GATI-KWE, a joint venture between Indian logistics company GATI and Japanese logistics company KWE. It summarizes GATI-KWE's services including express distribution, supply chain solutions, cold chain logistics, and freight forwarding. It also outlines the company's infrastructure, network reach, technology capabilities, and key clients. The document positions GATI-KWE as a leader in integrated logistics and express distribution across India and globally.
01 os pré-socráticos - coleção os pensadores (1996)Esdras Cardoso
Este documento fornece um resumo sobre os Pré-Socráticos, incluindo informações sobre os autores, tradutores e consultores envolvidos na publicação. Além disso, discute o surgimento da filosofia na Grécia antiga e a transição do mito para o pensamento racional, bem como a influência das epopéias de Homero na visão dos deuses naquela época.
O documento fornece instruções sobre como usar dicionários de forma eficaz, incluindo dominar a ordem alfabética, conhecer abreviaturas e a estrutura da informação. Também lista diferentes tipos de dicionários e fornece dicas sobre como procurar palavras rapidamente e entender as regras de apresentação.
Este documento discute as propriedades, processos de transformação, armazenamento e utilizações da madeira. Ele explica que a madeira pode ser absorver ou perder humidade, pode ser flexível ou durável, e pode variar em resistência, dureza e cor/textura. Ele também descreve os processos de corte, secagem e distribuição da madeira, bem como suas utilizações na carpintaria, objetos e instrumentos musicais.
O processo de comunicação na pesquisa científica envolve canais informais, como contatos pessoais e discussões em grupos, e canais formais como publicações. Os canais informais permitem troca rápida de ideias entre pares, enquanto os formais tornam os resultados públicos. Um bom pesquisador se comunica eficientemente e possui qualidades como curiosidade, criatividade e integridade intelectual.
Um texto narrativo conta uma história através de três partes principais: introdução, desenvolvimento e conclusão. A introdução apresenta a situação inicial e as personagens. O desenvolvimento descreve os acontecimentos da história. A conclusão mostra o desfecho da trama. Uma narrativa pode ser fechada, com conclusão conhecida, ou aberta, sem desfecho revelado.
Unit 5 - Arranging and Paying for Business Travel & AccommodationRobbieA
The document discusses procedures for arranging and paying for business travel and accommodation. It explains that administrative assistants are responsible for arranging travel based on information from employees' travel request forms. These forms provide important details like travel dates and budgets. The assistant then books travel and accommodation using various sources like the internet, following company policies. Various transportation and accommodation options are considered, balancing factors like cost, convenience and meeting needs.
This document provides an overview of the C programming language, including its history, uses, basic environment, data types, variables, operators, control structures like if/else statements and loops. It begins with the origins of C in the 1970s and explains that C combines high- and low-level language features, making it useful for systems programming tasks like operating systems and compilers. Examples are provided throughout to illustrate core C concepts like getting user input, performing calculations, and repeating actions with for, while and do-while loops.
C programming language:- Introduction to C Programming - Overview and Importa...SebastianFrancis13
C, a foundational programming language, emerged in the early 1970s by Dennis Ritchie at Bell Labs. While not the most beginner-friendly language due to its proximity to the underlying hardware, C's power lies in its ability to directly manipulate memory and interact with computer systems at a low level. This fine-grained control allows programmers to create efficient, high-performance software.
C's core elements include variables for data storage, operators for performing calculations and comparisons, control flow statements for directing program execution, and functions for modularizing code. It offers a rich set of data types, like integers, floating-point numbers, and characters, to represent diverse information. C's strength lies in its ability to manage memory allocation explicitly, allowing programmers to optimize memory usage for performance-critical applications. This granular control, however, comes with the responsibility of preventing memory leaks and other errors that can cause program crashes.
C's influence on the programming world is undeniable. It serves as the foundation for countless languages like C++, Java, and Python, which borrow heavily from its syntax and core concepts. Operating systems like Linux and macOS are written primarily in C, highlighting its ability to create robust and efficient system software. Even high-level applications often rely on C libraries for performance-sensitive tasks like graphics rendering or device drivers. In essence, C remains a cornerstone of modern computing, even as newer languages emerge, due to its unique blend of efficiency, control, and historical significance.
This document provides an overview of the C programming language. It discusses that C was created by Dennis Ritchie to directly interact with hardware and is the base for many other languages. It then lists advantages of learning C like it being easy to learn, producing efficient programs, and being compiled on many platforms. The document proceeds to describe different C language elements like tokens, keywords, constants, variables, operators, loops, structures, and unions. It provides examples for many of these elements.
The document provides an introduction to programming basics in C language. It discusses key concepts like how a program runs using compile and execute steps, IDE vs compilers, basic structure of a C program including main function and return statement. It also covers data types in C like integer, floating point and characters. Additionally, it explains various operators, decision making using if-else and loops, functions and input/output operations in C programming.
C is a programming language developed in 1972 by Dennis Ritchie at Bell Labs. It is a structured programming language that is highly portable and supports functions. A C program consists of functions, with a main function that is the program entry point. Input/output in C uses predefined functions like printf() and scanf(). A C program is compiled into an executable file that can run on many machine architectures. The document then discusses C program structure, data types, libraries, variables, keywords, operators, and control flow statements like if/else, switch, while, do-while and for loops.
This document provides an overview of the C programming language. It discusses that C was originally developed for Unix and is widely used. It then covers basics of C like data types, variables, constants, operators, keywords, identifiers and control flow statements like if/else, switch, loops. Examples are given for each concept like if/else to check voting eligibility, switch for selecting mobile language, for loops, while loops and arrays.
This material is developed in such beautiful manner to the beginners of C language can understand it accurately.
Every concept In material is explained in well disciplined.
Even it will be helpful to the professors for presenting lecture in class room
The document provides an overview of the C programming language, including its history, characteristics, environment, structure, data types, variables, decision making, looping, libraries, and uses. It describes how C was developed at Bell Labs in the early 1970s and later standardized. The summary highlights C's small fixed set of keywords, static typing, use of headers and functions, and popularity for systems programming and performance-critical applications due to its efficiency and ability to access hardware.
Here are the key points about scanf():
- scanf() is used to read/input values from the keyboard or standard input device.
- It follows the same format specifier conventions as printf() for data types (%d for int, %f for float, %c for char etc).
- The address of operator & is used before variables in the argument list to tell scanf() to store the input directly into the memory location of the variables.
- This is necessary because normally function arguments in C are passed by value, so scanf() would just get a copy of the variable instead of modifying the original one. The & takes the address to allow direct modification.
So in summary, scanf
C Programming - Basics of c -history of cDHIVYAB17
The document provides an introduction to C programming, covering topics such as what a program is, programming languages, the history of C, and the development stages of a C program. It discusses the key components of a C program including directives, the main function, and program structures. Examples are provided to illustrate C code structure and the use of variables, keywords, operators, input/output functions, and formatting output with printf.
And practice program with some MCQ questions to familiar with the concepts.
The document provides an introduction to the C programming language. It discusses the fundamentals of C including data types, variables, operators, control structures, arrays, functions, pointers, structures, unions, and file handling. The three key modules covered are: 1) C fundamentals, 2) arrays, functions, and strings, and 3) pointers, structures, unions, and file handling.
This document provides an introduction to the C programming language. It discusses the history and development of C, how C programs are structured, and the basic building blocks or tokens of C code like keywords, identifiers, constants, and operators. It also covers various data types in C, input and output functions, decision making and looping statements, functions, arrays, pointers, structures, unions, and file handling. The document is intended to give beginners an overview of the essential components of the C language.
This document provides an overview of the C programming language, covering topics such as the basic structure and skeleton of a C program, header files, the main function, running and compiling a C program, comments, variables, data types, constants, input/output operations and functions, programming errors, and keywords. It discusses the basic building blocks of a C program and how it is compiled and run, as well as fundamental concepts like variables, data types, operators, and functions.
This document provides an overview of basic C programming concepts including tokens, header files, data types, and common looping and decision-making statements in C such as if, if-else, while, and for loops. It explains that tokens are the smallest individual units in C and lists the different token types. It also discusses commonly used header files like stdio.h and their functions, as well as basic data types. The document provides syntax examples for if, if-else, while, and for statements to illustrate how they are used to control program flow.
This document provides an overview of programming in C. It discusses the importance of C as the base language for other programming languages and its efficiency. The basic structure of a C program is outlined as having documentation, include, define, global declaration, and main sections. Interpreters and compilers are explained as the two methods for running C programs, with compilers producing faster executable programs. Key aspects of C as a language are covered such as variables, data types, and constants.
The document provides an introduction to the C programming language, including its history, features, character sets, tokens, data types, operators, and the basic structure of a C program. It discusses key concepts such as variables, constants, comments, functions, preprocessing directives, and how to compile and execute a C program.
The document provides an introduction to the C programming language, including its history, features, character sets, tokens, data types, operators, and the basic structure of a C program. It discusses key concepts such as variables, constants, comments, functions, input/output, and how to compile and execute a C program.
Rigor, ethics, wellbeing and resilience in the ICT doctoral journeyYannis
The doctoral thesis trajectory has been often characterized as a “long and windy road” or a journey to “Ithaka”, suggesting the promises and challenges of this journey of initiation to research. The doctoral candidates need to complete such journey (i) preserving and even enhancing their wellbeing, (ii) overcoming the many challenges through resilience, while keeping (iii) high standards of ethics and (iv) scientific rigor. This talk will provide a personal account of lessons learnt and recommendations from a senior researcher over his 30+ years of doctoral supervision and care for doctoral students. Specific attention will be paid on the special features of the (i) interdisciplinary doctoral research that involves Information and Communications Technologies (ICT) and other scientific traditions, and (ii) the challenges faced in the complex technological and research landscape dominated by Artificial Intelligence.
David Boutry - Mentors Junior DevelopersDavid Boutry
David Boutry is a Senior Software Engineer in New York with expertise in high-performance data processing and cloud technologies like AWS and Kubernetes. With over eight years in the field, he has led projects that improved system scalability and reduced processing times by 40%. He actively mentors aspiring developers and holds certifications in AWS, Scrum, and Azure.
A SEW-EURODRIVE brake repair kit is needed for maintenance and repair of specific SEW-EURODRIVE brake models, like the BE series. It includes all necessary parts for preventative maintenance and repairs. This ensures proper brake functionality and extends the lifespan of the brake system
A substation at an airport is a vital infrastructure component that ensures reliable and efficient power distribution for all airport operations. It acts as a crucial link, converting high-voltage electricity from the main grid to the lower voltages needed for various airport facilities. This essay will explore the functions, components, and importance of a substation at an airport.
Functions of an Airport Substation:
Voltage Conversion:
Substations step down high-voltage electricity to lower levels suitable for airport operations, like terminal buildings, runways, and other facilities.
Power Distribution:
They distribute electricity to various loads, including lighting, air conditioning, navigation systems, and ground support equipment.
Grid Stability:
Substations help maintain the stability of the power grid by controlling voltage levels and managing power flows.
Redundancy and Reliability:
Airports often have redundant substations or interconnected systems to ensure uninterrupted power supply, even in case of a fault.
Switching and Control:
Substations provide switching capabilities to connect or disconnect circuits, enabling maintenance and power management.
Protection:
Substations incorporate protective devices, like circuit breakers and relays, to safeguard the power system from faults and ensure safe operation.
Key Components of an Airport Substation:
Transformers: These convert high-voltage electricity to lower voltage levels.
Circuit Breakers: These devices switch circuits on or off, protecting the system from faults.
Busbars: These are large, conductive bars that distribute electricity from transformers to other equipment.
Switchgear: This includes equipment that controls the flow of electricity, such as isolators and switches.
Control and Protection Systems: These systems monitor the substation's performance, detect faults, and automatically initiate corrective actions.
Capacitors: These improve the power factor and reduce losses in the system.
Importance of Airport Substations:
Reliable Power Supply:
Substations are essential for providing reliable power to critical airport functions, ensuring safety and efficiency.
Safe and Efficient Operations:
They contribute to the safe and efficient operation of runways, terminals, and other airport facilities.
Airport Infrastructure:
Substations are an integral part of the airport's infrastructure, enabling various operations and services.
Economic Impact:
Substations support the economic activities of the airport, including passenger and cargo handling.
Modernization and Sustainability:
Modern substations incorporate advanced technologies and systems to improve efficiency, reduce energy consumption, and enhance sustainability.
In conclusion, an airport substation is a crucial component of airport infrastructure, ensuring reliable and efficient power distribution, grid stability, and safe operations.
How Binning Affects LED Performance & Consistency.pdfMina Anis
🔍 What’s Inside:
📦 What Is LED Binning?
• The process of sorting LEDs by color temperature, brightness, voltage, and CRI
• Ensures visual and performance consistency across large installations
🎨 Why It Matters:
• Inconsistent binning leads to uneven color and brightness
• Impacts brand perception, customer satisfaction, and warranty claims
📊 Key Concepts Explained:
• SDCM (Standard Deviation of Color Matching)
• Recommended bin tolerances by application (e.g., 1–3 SDCM for retail/museums)
• How to read bin codes from LED datasheets
• The difference between ANSI/NEMA standards and proprietary bin maps
🧠 Advanced Practices:
• AI-assisted bin prediction
• Color blending and dynamic calibration
• Customized binning for high-end or global projects
This presentation highlights project development using software development life cycle (SDLC) with a major focus on incorporating research in the design phase to develop innovative solution. Some case-studies are also highlighted which makes the reader to understand the different phases with practical examples.
Impurities of Water and their Significance.pptxdhanashree78
Impart Taste, Odour, Colour, and Turbidity to water.
Presence of organic matter or industrial wastes or microorganisms (algae) imparts taste and odour to water.
Presence of suspended and colloidal matter imparts turbidity to water.
2. C Programming Tutorial
Contents:
Introduction
a) History and Usages
b) Keywords
c) Identifiers
d) Variables and Constants
e) Programming Data Types
f) Input and Output
g) Programming Operators
Decision and Loops
a) If…If else and Nested If else
b) C Programming Loops
c) Break and Continue
d) Switch…..case Statement
e) go to function
C Functions
a) User Defined
b) Function Recursion
c) Storage class
Arrays
a) One Dimensional Array
b) Multi dimensional Array
Pointers
a) Pointers and Function
String
Structure and Union
a) Union
Advance Functions in C
a.) Enumeration
b.) Pre-processor
c.) Library Function
3. Chapter 1
Introduction
a.) History
C is a general purpose, structured programming language. It was
developed by Dennis Ritchie in 1970 in BELL Lab.
C Programming is widely used in the Programming world for to
develop all the advanced applications. This tutorial will use you to learn all the
basic things in the C Programming.
Advantages of C:
Flexible
Highly portable
Easily extended by the user
Faster and Efficient
Include number of Built-In-function
Disadvantages of C:
No runtime checking
It is very executable to fixed bugs
Application of C:
Unix completely developed by C
Many desktop application developed by C
Used to solve mathematical functions
It is used to implement different OS.
Getting Started with C:
For clear understanding we have to run all the basic concepts, In order
to run programs we need compiler, compiler will change the source code to
object code and create executable files. For practical uses we install the basic
compiler Turbo C/ Advanced compiler Codelite.
Character Set:
Character set are the set of alphabets, numbers and some special
characters which is valid in C.
4. Alphabets:
Upper Case: A to Z
Lower Case: a to z
Digits:
0 to 9
Special characters:
Here some of the special characters used in C
> < $ ,
# ^ ” “
} { ( )
b.) Keyword:
Keyword is the reserved words used in programming. Each
keyword has fixed meaning and it cannot be changed by any users.
Ex: int money;
Here int is a keyword.
Keyword is a case-sensitive and all keyword must be in lower case.
Keywords in C Language
auto double int struct
break else long switch
case enum register typedef
char extern return union
continue for signed void
do if static while
default goto sizeof volatile
const float short unsigned
5. c.) Identifiers:
Identifiers are name given to C entities such as structures, keywords
or functions etc… Identifiers are unique name given to the C entities which is
used to identify during the execution.
Ex: int money;
Here money is an identifier. Identifier can be in Upper or Lower
case. It can be start with digits or “_”.
d.) Variables and constants:
Variables:
Variables are used to store memory location in system memory,
each variable have unique identifiers.
Ex: int num;
“num” is a variable for integer type.
Variable didn’t contain case sensitive, it may be start with underscore or digits.
Constants:
Constants are the term which cannot be changed during the execution of the
program. It may be classified into following types:
Character Constant:
Character constant are the constant which used in single quotation
around characters. For example: ‘a’, ‘I’, ‘m’, ‘F’.
Floating Point constant:
It may be numerical form that maybe fractional or exponential
form.
Ex: -0.012
1.23 etc…
Integer Constant:
Integers constant are the numeric constants without any floating
point/exponential constant or character constant. It classified into 3 types:
o Octal digits: 0,1,2,3,4,5,6,7
o Decimal Digits: 0,1,2,3,4,5,6,7,8,9
o Hexadecimal digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H
6. Escape Sequence
Sometimes it is necessary to use newline, tab etc… so we have to use
“/” which is known as Escape sequence.
Escape Sequences
Escape Sequences Character
b Backspace
f Form feed
n Newline
r Return
t Horizontal tab
v Vertical tab
Backslash
' Single quotation mark
" Double quotation mark
? Question mark
0 Null character
String Constant:
Which are enclosed in double quote mark. For example
“good”.
Enumeration Constant:
Keyword enum is used to declare enumeration. For example
enum color{yellow,white,green}
here the variable name is yellow,white,green are the enumeration constant
which having values 0,1,2 respectively.
e.) Programming Data types
Data types in C are classified into 2 types:
1. Fundamental data types
2. Derived Data Types
Syntax for Data types: Data type variable name;
7. Classifications of Fundamental Data types
Integer Type: Keyword int is used for declaring with integer types
Floating Types: Keyword float and double are used for declaring the floating
types
Character Types: keyword char is used for declaring the variables of character
type.
Classifications of Derived Data types
Arrays
Structure
Enumeration
Pointers
Qualifiers: It is used to alter the meaning of base data types to yield a new data
type.
f.) Input/output:
The C Program input and output functions are printf() and scanf()
Printf() it’s used to provide output to the users
Scanf() it’s used to taken input from the users.
Examples for I/O function
#include<stdio.h>
Void main();
{
int c;
printf(“enter the number c”);
scanf(“%d”,&c);
printf(“number=%d,c”);
return 0;
}
Here printf() is used to display the output .
8. Scanf() is ask the value from the user ‘&’ denotes that the address of the C and
value stored in the number.
Stdio represent standard input output function which is the library function
#include is used to paste the code from the header when it is required.
g.) Programming Operators:
Operators are a symbol which operates on a value or variable. For Example:
+ is an operator which is used for a addition.
Operators in C programming
Arithmetic operators(+,-,%,*)
Increment and Decrement operators(a++,++a,a--,--a)
Assignment operators(+=,a+=b is equal to a=a+b)
Relational operators(==,<=,>=)
Logical operators(&&,||)
Conditional operators (?,: it’s used to making decision)
Bitwise operators(&,| etc)
9. Chapter-2
Decision and loops
a.) If, If…else, Nested If…else….
This Statement is used to execute the programming by one
time decision i.e. execute one code and ignore one code.
If Statement
It executes the statement if the test expression is true.
Syntax:
if (test expression)
{
// statement to be executed when the test expression is true
}
If..else Statement
This statement is used when the programmer is want to execute one
statement if the test expression is true or executes other expression if the test
expression is false.
Syntax:
10. if (test expression)
{
Statement to be execute when expression is true;
}
else
{
Statement to be executed when it is false;
}
Nested if else statement
This statement is used when the programmers need more than one
expression.
The nested statement is work by step by step if first statement is true it never
enter t the 2nd
statement when it is wrong it will go to the next expression. This
will used by programmers when they need to check more than one expression.
Syntax:
if(test expression)
{
execute if expression is true; }
11. else if( test expression 1)
{
execute when expression 0 is false and 1 is true;
}
else if (test expression 2)
{
execute when expression 0 and 1 are false and 2 is true);
}
.
.
.
else
{execute the statement when all the above are false;
}
b.) C Programming Loops
Loops are used when the programmer wants to execute the same block
repeatedly for number of times. Loop function executes the certain block of
code until the code becomes false.
Types of Loops:
1. for Loop
2. while Loop
3. do…while Loop
for Loop
for loop execute the program block until the given statement is false.
Syntax:
for(initialization; expression; update statement)
{
Body of the code ;}
12. The Initialization process run only at initial stage of the
programming then it checks the expression if the expression is false loop is
terminated. It is true it executes the code of the body and then executes the
update statement. This process repeats until expression becomes false.
13. Example Program: Find out the sum of n Natural Numbers, when n is
entered by the users.
#include<stdio.h>
#include<conio.h>
int main()
{
int n,c,s=0;
printf("enter the value of n");
scanf("%d",&n);
for(c=1;c<=n;c++)
{
s=s+c;
}
printf("s=%d",s);
getch();
return 0;
}
Output
Enter the value of n=9
S=45
14. While Loop
It checks while expression is true of false. If the expression is true it
executes the body of the loop after the execution it checks the body again this
process continues until it becomes false.
Syntax:
while (test expression)
{
Body of the loop; }
Example: Find the factorial of the number
#include<stdio.h>
int main()
{
int factorial,number;
printf(“enter a number n”)
scanf(“%d”,&number);
factorial=1;
while(number>0)
{ factorial=factorial*number;
--factorial;
}
15. printf( factorial=%d”, factorial);
return 0; }
do…while loop
The only difference between the while and do while is it executes the
statement and then check the test expression.
Syntax:
do
{code to be execute; }
while(test expression);
Write a C program to add the numbers until the user enter the zero
#include<stdio.h>
int main()
{
int num,sum=0;
do
{ printf(“enter a number n”);
scanf(“%d”,&num);
sum=sum+num;
}
while(num!=0);
16. printf (“%d”,sum);
return 0;}
Summary
for loop while loop do..while loop
Initialization,
It is usually counter
variable, statement that
will be executed every
iteration of the loop,
until the counter variable
increment or decrement
It checks the condition
first, if condition is false
it never enter into the
loop.
It executes the
statement before checks
the condition at least one
iteration takes place
when the condition is
false
c.) Break and Continue
The two statements break and continue is used to skip or terminate the
some programming blocks without checking it.
Break statement
It is used to terminate the loop if the statement is true.
Syntax:
break;
Example: write a C program to find the average value of numbers, terminate
the program if the input is negative display the average value and end the
program
#include<stdio.h>
int main()
17. {
int n,i;
float average,num,sum;
printf(“maximum numbers of inputs”);
scanf(“%d”,&n);
for(i=1;i<=n;++i)
{ printf(“enter the n %d”,i);
scanf(“%d”,&n);
if(num<0)
break;
sum=num+sum;}
average=sum/(i-1);
printf(“Average=%.2f”,average);
return 0;
}
Continue Statement
To skip some statement in the function continue statement is used
Syntax;
continue;
18. Example: Write a C program to find the product of 4 numbers
#include<stdio.h>
int main()
{ int i,num,product;
for(i=1,product=1;i<=4;++i)
{ printf(“enter the num %d”,i);
scanf(“%d”,&num);
if(num==0)
continue;
product*=num;}
printf(“product=%d”,product);
return 0; }
Break Continue
It can appear in loop and switch
statements.
It can appear only in loop statement.
It terminates the switch or loop
statement when break is encountered.
It does not cause the termination,
when continue encountered it executes
all iteration in the loops
d.) switch…..case Statement
Decision making are used to select the particular block or code with many
other alternative codes. Instead of switch case we can use nested if else but it is
more complicated while compare with switch case.
Syntax:
switch (n) {
case constant 1:
A code to be executed if n is equal to constant 1;
break;
case constant 2:
19. A code to be executed if n is equal to constant 2;
break;
.
.
.
default:
codes to be executed if n is not equal to any constants;
}
Example Program: Write a program to select the arithmetic operator and two
operands and perform the corresponding operations
#include<stdio.h>
int main()
{
char o;
float n1,n2;
20. printf(“select an operator + or – or * or n);
scanf(“%c”,&o);
printf(“enter the two operands:”);
scanf(“%f%f”,&n1,&n2);
switch(o)
{
case +:
printf(“%.1f+%.1f=%.1f”,num1,num2,num1+num2);
break;
case -:
printf(“%.1f-%.1f=%.1f”,num1,num2,num1-num2);
case *:
printf(“%.1f*%.1f=%.1f”,num1,num2,num1*num2);
case :
printf(“%.1f %.1f=%.1f”,num1,num2,num1num2);
default:
printf(‘operator Error”);
break;
}
return 0; }
e.) go to function
This statement is used to altering the normal sequence of program by
transferring control to some other parts.
Syntax:
goto label;
…………….
…………….
21. label;
statement;
we are not using goto statement because it’s make more complex and
considered as a harmful construct. goto statement is replaced by the use of break
and continue statement.
22. Chapter 3
C Functions
A function is a segment which is used to perform the specified task. A
C program has at least one main() function, without main there is no C
programs.
Types of C Functions
Library Functions
User defined functions
Library Functions
It is a built in function in C programming
Example:
main() --- Every programs start with main function
print() --- used to display the output
scanf() --- used to enter the input
a.) User Defined Function
C allows the programmer to define the function according to their
requirements. For example, a programmer wants to find the factorial and check
whether it is prime number or not in the same program, we can use the 2
functions in the same program.
Working of User defined:
#include<stdio.h>
void function_name()
{……………………
………………………}
int main()
{ ………………………..
………………………….
23. Function name();
……………………
……………………. }
As we mentioned earlier C program is starts with main function when
the program reaches to the function name it jumps to the void function name
after execution of the void function it return to the function name and executes
it.
Advantages:
Easily maintain and debug, large no of codes easily divided in to small
segments and decompose the work load.
Example:
#include<stdio.h>
int add(int a,int b); //Function declaration(prototype)
int main()
{int num1,num2,sum;
printf(“enter the numbers to add”);
scanf(“%d %d”,&num1,num2);
sum=add(num1,num2); //function call
printf(“sum=%d”,sum);
return 0;
}
int add(int a,int b);
{
int add;
add=a+b;
return add;}
24. Function Declaration (prototype)
Every function has to declare before they used, these type of declaration
are also called function prototype. It gives compiler information about name,
function, type of argument that has to pass.
Syntax of Prototype
return-type fun-name ( type(1) argument(1)…………….type(n) argument(n));
From the above example
int add(int a,int b); this is function prototype
fun-name add
return type int
Function call:
Control of the program transferred to the user defined when the function
is called.
Syntax:
function_name(arg 1,arg2);
Function Definition:
It contains specific codes to perform specific task. It is the first line of function
declaration.
Syntax:
function name(arg(1),arg(2))
b.) Function Recursion:
The function that calls itself without any other external functions is known
as recursion.
Example:
#include<stdio.h>
int sum(int n);
int main()
{ int num,add;
25. printf(“enter a positive integer”);
scanf(“%d”,&n);
add=sum(n);
printf(“sum=%d”,add);
}
int sum(int n)
{
if(n==0)
return n;
else
return n+sum(n-1);}
Advantage:
It is more elegant and requires few variables which make program clean
It replaced the complex nesting code function.
Disadvantage:
It is hard to write the recursion.
Hard to debug.
c.) C Programming Storage:
Every variable has two properties:
Type
Storage
Type refers to the function whether it is integer or floating or character
Storage refers how long it stays. It is classifies into 4 types:
Auto
External
Static
Register
26. auto: Variable declared by the inside of the function by default. It access by the
local variables only.
external: It can be accessed by the any function. It is called as global variables
and it declared outside in the function.
static: The value of static variable persists until the end of the program.
register: Register variable are similar like auto and used in global variable.
27. Chapter-4
Arrays
Main use of array is to handle similar type of data’s. For example, if the
company wants to save 100 employees details. By using simple code form, the
programmer has to be creating the data for 100 employees individually, but by
using arrays we can easily replace it.
An Array is a sequence of data types for homogeneous type.
Arrays are two types
1. One Dimensional Array
2. Multi dimensional array
a.)One Dimensional Array:
Declaration of One Dimensional Array:
declaration_type array_name[array_size];
Example: int age[5];
Array Element:
Size of array defines the number of elements used in the array. Each
element can be accessed by the user by their usage.
int age[5];
Age[0] Age[1] Age[2] Age[3] Age[4]
Every array element can be start by 0;
Example:
#include<stdio.h>
void main()
{
int marks[10],i,n,sum=0;
printf(“enter the number of students:”);
scanf(“%d”,&n);
for(i=0;i<n;i++)
28. { printf(“enter the number of students%d:”,i+1);
scanf(“%d”,&marks[i]);
sum=sum+marks[i];}
printf(“sum=%d”,sum);
return 0; }
b.) Multi Dimensional Array:
C Program allows programmers to create array of arrays in the
program.
Ex:
float a[2][6];
Here, an array of two dimensions, this is example of multi-dimensional array.
Initialization of Array:
a[2][4]={{1,2,0,0} ,{3,4,5,6}};
29. Chapter-5
Pointer
Pointers are the important feature it’s different the C and
C++ from java and other languages. Pointers are used to access the memory and
manipulate the address.
Reference Operator (&):
& denotes address in the memory
Lets explain in the program
#include<stdio.h>
int main()
{ int var=5;
printf(“value=%d”,var);
printf(“address=%d”,&var);
return 0;}
Output:
Value=5
Address=2567891
From the above code we can know clearly var is a name given to that location
and 5 is stored in the 2567891 location.
Reference Variable (*):
It is used to hold the memory address i.e is variable that holds address is
Reference variable
Arrays Pointers
Array is a single, pre-allocated and
continues element
Pointer is a place in a memory which is
used to store the another place or
function
It can’t be resized It can be resized
30. It can be initialized It can’t be initialized
a.) Pointers and Functions
When the Argument is passed using pointer address of the memory
location is passed instead of value.
Example:
#include<stdio.h>
void swap(int *a,int *b);
int main()
{ int n1=5,n2-10;
swap(&n1,&n2);
printf(“n1=%d n”,n1);
printf(“n2=%d’,n2);
return 0; }
void swap(int *a, int *b)
{ int temp;
temp=*n1;
*n1=*n2; *n2=temp; }
The address of n1 and n2 are passed to the memory location of pointer a and b,
So the value of the memory location changed the value in memory location also
changed, clearly if the *a and *b are changed it will reflected in n1 & n2
This is known as call by reference.
31. Chapter-6
String
Array of character is string.
Declaration of String:
String is declared like array the difference is string is denoted as char only
char S[5];
S[0] S[1] S[2] S[3] S[4]
Declaration by using pointer
char *p;
Initialization of string:
char c[]="abcd";
char[5]= "abcd";
char[]={‘a’, ‘b’,‘c’,‘d’,‘0’};
Example: How to read string from terminal
#include<stdio.h>
#include<string.h>
int main()
{char name[20];
printf(“enter name:”);
scanf(“%s”,name);
printf(“your name is %s:”,name);
return 0;}
output:
Enter name: Swan Tech
Your name is: Swan
32. Here the compiler will give the first name only because there is white
space
String Handling Functions
We can use strings for various application like finding length etc.. but
programmer can use the library function string.h in the program
We can manipulate the string function manually so we use the handling
functions.
Function Explanation
strlen() Length of the string
strcpy() Copy the string
strcat() Joins two string
strcmp() Compare two strings
gets() and puts()
we can use this gets and puts condition to take input string and display
the output string
Example:
#include<stdio.h>
#include<string.h>
int main()
{ char name[30];
printf(“enter the name”);
gets(name);
printf(“The name enter is:”);
puts(name);
return 0;}
Here gets and puts are likely scanf() and printf()
33. Chapter-7
Structure and Union
Structure:
Structure is the collection variable that is used to store the different variables
under a single name. If you want to store the different details of the students like
register number, marks, details etc
We are using structure for the better approach.
Definition:
Keyword struct is used for denote the function.
Syntax:
struct_structure name
{ datatype 1;
datatype 2;
.
.
datatype n;}
Union
Union is similar to the structure, it derived from the structure and we sued union
keyword to denote it in the code
The main difference is All members can be accessed the structure but only the
members in the union can access the code
34. Structure Union
Using keyword struct for denote Using keyword union for denote
One or more members can initialize
the function
Only one member can initialize
It allocates memory equal to the sum
of the memory allocated to its each
individual members
It allocates one block memory which is
enough to stored all the data
Each member have their own space Only one memory for all users
35. Chapter-8
Advance Function in c
a.) Enumeration
Enumeration is user defined data type consist of integral constant
and each integral constant have a keyword enum to defined the enumeration
type.
enum type_name{ value 1,value 2…….value n};
By default value 1=1 and value 2=1 but the user can changed the default values.
Example of Enumerated:
#include<stdio.h>
enum week{Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday};
int main()
{ enum week today;
Today=Wednesday;
printf=(“%d day”,total+1);
return 0;}
Output:
Today=4
b.) Pre-processor
In C language the line which is beginning with # symbol is
known as Pre-processor. It is substitution tool and it instruct compiler to do the
specific function before the compilation of the program.
Example:
#include To insert particular header
#define Substitute a particular macro
36. c.) Library Function
It is inbuilt function of C programming which is written with their
respective header files.
For Example: if you want to run printf() you need to include stdio.h in the
header file.