This document discusses functions in C programming. It defines functions as blocks of code that perform specific tasks. It explains the key components of functions - function declaration, definition, and call. It provides examples of defining, declaring, and calling functions. It also discusses recursion, system-defined library functions, and user-defined functions.
hey this is Rupendra choudhary..!! i shared my "c" lang ppt..!!! u just goto that ppt if u r in deep with "c" ..!!! i create after i hv played a much with "c"..(sorry bt ppt is slightly disturbd may be due to unsupportable msppt2010 by slideshare)...find me on rupendrachoudhary1990@gmail.com or https://rupendrachoudhary.wordpress.com
PowerPoint presentation of functions in C language. It will give you brief idea how function works in C along with its unique features like return statement.
hey this is Rupendra choudhary..!! i shared my "c" lang ppt..!!! u just goto that ppt if u r in deep with "c" ..!!! i create after i hv played a much with "c"..(sorry bt ppt is slightly disturbd may be due to unsupportable msppt2010 by slideshare)...find me on rupendrachoudhary1990@gmail.com or https://rupendrachoudhary.wordpress.com
PowerPoint presentation of functions in C language. It will give you brief idea how function works in C along with its unique features like return statement.
The ppt describes usage of functions in c language. Showing basic use of function and determining the differences between function call by value and function call by reference using pointer. It also includes valid use in swapping two numbers in c along with different outputs. Overall its a basic note for c language.
Note: This slide was created by me. I am Md. Touhidul Islam Shawan. Here in these slide I have written about some basic points of function of c program and how the function works.
Call by value or call by reference in C++Sachin Yadav
Call by value means passing the value directly to a function. The called function uses the value in a local variable; any changes to it DO NOT affect the source variable. In call by value method, the called function creates its own copies of original values sent to it. Any changes, that are made, occur on the function’s copy of values and are not reflected back to the calling function.
Programming Fundamentals Functions in C and typesimtiazalijoono
Programming Fundamentals
Functions in C
Lecture Outline
• Functions
• Function declaration
• Function call
• Function definition
– Passing arguments to function
1) Passing constants
2) Passing variables
– Pass by value
– Returning values from functions
• Preprocessor directives
• Local and external variables
The ppt describes usage of functions in c language. Showing basic use of function and determining the differences between function call by value and function call by reference using pointer. It also includes valid use in swapping two numbers in c along with different outputs. Overall its a basic note for c language.
Note: This slide was created by me. I am Md. Touhidul Islam Shawan. Here in these slide I have written about some basic points of function of c program and how the function works.
Call by value or call by reference in C++Sachin Yadav
Call by value means passing the value directly to a function. The called function uses the value in a local variable; any changes to it DO NOT affect the source variable. In call by value method, the called function creates its own copies of original values sent to it. Any changes, that are made, occur on the function’s copy of values and are not reflected back to the calling function.
Programming Fundamentals Functions in C and typesimtiazalijoono
Programming Fundamentals
Functions in C
Lecture Outline
• Functions
• Function declaration
• Function call
• Function definition
– Passing arguments to function
1) Passing constants
2) Passing variables
– Pass by value
– Returning values from functions
• Preprocessor directives
• Local and external variables
It tells about functions in C++,Types,Use,prototype,declaration,Arguments etc
function with
A function with no parameter and no return value
A function with parameter and no return value
A function with parameter and return value
A function without parameter and return value
Call by value and address
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
2. Functions
• When we write a program to solve a larger problem, we divide that larger problem
into smaller sub problems and are solved individually to make the program easier.
• In C, this concept is implemented using functions. Functions are used to divide a
larger program into smaller subprograms such that the program becomes
easy to understand and easy to implement.
• Function is a subpart of a program used to perform a specific task and is
executed individually.
• Is a self-contained block of code that performs a particular task.
• Every C program has at least one function, which is main(), and all the most trivial
programs can define additional functions.
3. Advantage of Function
• It increases code reusability.
• Program development will be faster.
• Program debugging is faster.
• Can be developed in shorter period of time.
• Many programmers can be involved and perform same task at the same or
different period of time.
4. Function Aspects/Components of Function
• Function Declaration (Function Prototype)
• Function Definition
• Function Call
5. Function Declaration(Prototype)
• The function declaration tells the compiler about function name, the
data type of the return value and parameters.
• The function declaration is also called a function prototype.
• The function declaration is performed before the main function or
inside the main function or any other function.
6. Syntax: function Prototype(declaration)
• return_type function_name( parameter list );
• Return_value function_name(args1,args2,…..,argsN);
• Example:
• Int sum(int , int);
• Float sum(float, float);
• Int max(int,int);
7.
8. Function definition
• The function definition provides the actual code of that function. The
function definition is also known as the body of the function.
• The actual task of the function is implemented in the function definition.
• That means the actual instructions to be performed by a function are
written in function definition. The actual instructions of a function are
written inside the braces "{ }".
• The function definition is performed before the main function or after the
main function.
• The first line of function definition is function declaration and followed
by function body.
9. Syntax: Function Definition
• returnType functionName(parametersList)
{
Actual code...
}
• Data_type function_name(data_type args1, data_type args2,…,
data_type argsN)
{
// body of function
}
10.
11. The first line of function definition is function declaration and followed by function body.
12.
13. Call the function/Function Call
• The function call tells the compiler when to execute the function
definition.
• When a function call is executed, the execution control jumps to the
function definition where the actual code gets executed and returns
to the same functions call once the execution completes.
• The function call is performed inside the main function or any other
function or inside the function itself.
• To call a function, you simply need to pass the required parameters
along with the function name, and if the function returns a value,
then you can store the returned value.
14. Syntax: Function Call
• Variable= function_name(arg1,arg2,………,argN);
• Function_name(arg1,arg2,…,argN);
15.
16.
17. #include <stdio.h>
int addNumbers(int a, int b); // function prototype
int main()
{
int n1,n2,sum;
printf("Enters two numbers: ");
scanf("%d %d",&n1,&n2);
sum = addNumbers(n1, n2); // function call
printf("sum = %d",sum);
return 0;
}
int addNumbers(int a, int b) // function definition
{
int result;
result = a+b;
return result; // return statement
}
18. #include <stdio.h>
/* function declaration */
int max(int num1, int num2);
int main () {
int a = 100;
int b = 200;
int ret;
/* calling a function to get max value */
ret = max(a, b);
printf( "Max value is : %dn", ret );
return 0;
}
/* function returning the max between two numbers */
int max(int num1, int num2) {
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}
19. #include<stdio.h>
int sum(int, int);
void main()
{
int a,b,result;
printf("nGoing to calculate the sum of two numbers:");
printf("nEnter two numbers:");
scanf("%d %d",&a,&b);
result = sum(a,b);
printf("nThe sum is : %d",result);
}
int sum(int a, int b)
{
return a+b;
}
20. Assignments
• WAP to print the smallest numbers among three numbers.
• WAP to check whether the entered number is odd or even.
• +ve,-ve or zero, using function.
• Sum of N numbers.
• Multiplication table.
• Reverse of a number.
• 1 1 2 3 5 8… upto nth term(Fibonacci).
21. Recursion
• Recursion is the process of repeating items in a self-similar way.
• If a program allows you to call a function inside the same function, then it is
called a recursive call of the function.
• Recursion is a programming technique that allows the programmer to express
operations in terms of themselves.
• In C, this takes the form of a function that calls itself. A useful way to think of
recursive functions is to imagine them as a process being performed where one
of the instructions is to "repeat the process".
• This makes it sound very similar to a loop because it repeats the same code, and
in some ways it is similar to looping. On the other hand, recursion makes it easier
to express ideas in which the result of the recursive call is necessary to complete
the task. Of course, it must be possible for the "process" to sometimes be
completed without the recursive call.
22. One simple example is the idea of building a wall that is ten feet high; if I want to
build a ten foot high wall, then I will first build a 9 foot high wall, and then add an
extra foot of bricks. Conceptually, this is like saying the "build wall" function takes
a height and if that height is greater than one, first calls itself to build a lower wall,
and then adds one a foot of bricks.
23.
24.
25. #include <stdio.h>
int fibonacci(int i) {
if(i == 0) {
return 0;
}
if(i == 1) {
return 1;
}
return fibonacci(i-1) + fibonacci(i-2);
}
int main() {
int i;
for (i = 0; i < 10; i++) {
printf("%dtn", fibonacci(i));
}
return 0;
}
26. #include <stdio.h>
int sum(int n);
int main() {
int number, result;
printf("Enter a positive integer: ");
scanf("%d", &number);
result = sum(number);
printf("sum = %d", result);
return 0;
}
int sum(int n) {
if (n != 0)
// sum() function calls itself
return n + sum(n-1);
else
return n;
}
27.
28. int rows, columns;
int main() {
int matrix1[10][10], matrix2[10][10];
int matrix3[10][10], i, j;
printf(“Enter the no of rows and columns(<=10):”);
scanf(“%d%d”, &rows, &columns);
if (rows > 10 || columns > 10) {
printf(“No of rows/columns is greater than 10n”);
return 0;}
printf(“Enter the input for first matrix:”);
for (i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
scanf(“%d”, &matrix1[i][j]);}}
printf(“Enter the input for second matrix:”);
for (i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
scanf(“%d”, &matrix2[i][j]);}}
matrixAddition(matrix1, matrix2, matrix3);
printf(“nResult of Matrix Addition:n”);
for (i = 0; i < rows; i++) {
29. for (j = 0; j < columns; j++) {
printf(“%5d”, matrix3[i][j]);}
printf(“n”);}
getch();
return 0;
}
void matrixAddition(int mat1[][10], int mat2[][10], int mat3[][10]) {
int i, j;
for (i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
mat3[i][j] = mat1[i][j] + mat2[i][j];
}
}
return;
}
30.
31. System Defined/Library Function
• The system defined functions are also called as Library Functions or
Standard Functions or Pre-Defined Functions. The implementation of
system defined functions is already defined by the system.
• In C, all the system defined functions are defined inside the header files like
stdio.h, conio.h, math.h, string.h etc.,
• For example, the funtions printf() and scanf() are defined in the header file
called stdio.h.
• Whenever we use system defined functions in the program, we must
include the respective header file using #include statement.
• For example, if we use a system defined function sqrt() in the program, we
must include the header file called math.h because the function sqrt() is
defined in math.h.
32. #include <stdio.h>
#include <math.h>
int main()
{
float num, root;
printf("Enter a number: ");
scanf("%f", &num);
// Computes the square root of num
and stores in root.
root = sqrt(num);
printf("Square root of %.2f = %.2f",
num, root);
return 0;
}
33. User Defined Function
• The function that is implemented by user is called as user defined
function.
• For example, the function main is implemented by user so it is called
as user defined function.
• In C every user defined function must be declared and implemented.
Whenever we make function call the function definition gets
executed.
• For example, consider the following program in which we create a
fucntion called addition with two paramenters and a return value.
34. #include <stdio.h>
int addNumbers(int a, int b); // function prototype
int main()
{
int n1,n2,sum;
printf("Enters two numbers: ");
scanf("%d %d",&n1,&n2);
sum = addNumbers(n1, n2); // function call
printf("sum = %d",sum);
return 0;
}
int addNumbers(int a, int b) // function definition
{
int result;
result = a+b;
return result; // return statement
}