SlideShare a Scribd company logo
1 of 5
JAMES KILONZO 19/03722
BBIT(YEAR 1 SEM2) Town campus
PROGRAMMING CAT
Q1.
a) Structured programming is an approach to writing programs thatare easier
to read, test, debug, and modify.
b) C is a portable language because it is not made for a particular platform
hence code written in c can be compatible with all machines. It is also
efficient becauseof availability of efficient compilers.
c)
i. The processor directive is included in a programthat begins with the
character #, which them different froma typical sourcecode text.
ii. Declaration is a statement describing an identifier, such as the name
a variable or a function.
iii. A Function is a group of statement that together performs a test. A
function declaration tells the compilers about a functionโ€™s name,
return type, and parameters.
iv. An expression is a combination of one or more constants, variable,
operators and functions that the programming language interprets
together with a computer to produceanother value.
v. A comment is a programmerโ€™s readableexplanation or a notation in
the sourcecode of a computer program. They are added with a
purposemaking of the sourcecode easier for humans to understand.
d)
๏ƒ˜ c keywords arepredefined, reserved words used in programming
that have special meanings to compiler. They are partof syntaxand
they cannot be used as identifier
Q2.
a. Array variableholds multiple values whereas simple variable holds a single
value.
b. Data type example size
i. Integer e.g. 6,8,10 2bytes
ii. Float e.g. 12.3,66.9,7.8 4bytes
iii. Character eg.97(in ASCII) 1byte
Double e.g. 234.4567 8bytes
c.
a) A symbolic constantis an identifier that is replaced by replacement text by
a processor beforethe programis compiled. it involves the useof #define.
b) Itis easier to manage programs
Easy to debug errors
d. A storageclass represents the visibility and a location of a variable. It
describes the features of a variableand how it is stored
i. Static - it is a local variablewhich is capable of returning a value even
when control is transferred to the function call.
ii. Register -used to storevariables.
iii. Auto -is a default storageclass for local variable and can only be used
with functions.
Q3
a) A structureis a user defined data type in c language which allows us to
combine data of different types together.
b) In
Q4
a.
1. Programdesign
Itis a foundation for good program.
Programdesign is concerned with development and strategy.
Itinvolves 4 stages:
i. Problem analysis
ii. Outlining the programstructure
iii. Algorithm development
iv. Problem analysis
2. Programcoding
Itshould be readable and simple to understand.
Elements in coding include:
i. Internaldocumentation
ii. Construction of statements
iii. Generality of program
iv. Input/outputformats
3. Programtesting
This is the process of reviewing and executing a programwith the intent of
detecting errors.
Testing should include necessary steps to detect all possibleerrors in a
program.
Itincludes 2 stages:
a) Human testing
b) Computer based testing
b. I) Linking is necessary to compile only those sources files that have changed
for the rest, the objectfiles that are sufficient input for the linker.
ii) because of the errors that are generated while executing the programs.
c. To check wherehe has written the else statement where it should not have
been written. He should also check wherehe has forgotten to put a
semicolon at the end of the statement.
Q5.
a)
i. Avoid repetition of codes.
Reduces chances of errors.
Modifying of a programis easier.
Clear programlogic
ii. Function prototypeis a declaration of a function that specifies the
functionโ€™s name and type of signature.
b)
#include<stdio.h>
Intmax(int a, int b);
Intmain ()
{
Inta, b;
Printf(โ€œenter the firstand second number:nโ€);
Scanf(โ€œ%d%dโ€,&p, &w);
Greater_ num= max(a, b)
Printf(โ€œthelarger value is n%dโ€, greater _num);
Return 0;
}
int max(int a, int b)
{
Intvalue;
If(a>b)
{
Value=a;
}
Else
Value =b;
Return value;
}
c)
A function is created which multi plays individual numbers together and
the function is called into the main functions whereit passes its
variables to count.
So that when countis 1, the number multi plays itself due to the
variables passed into the main function then the productis displayed on
the screen using printf function and each number is printed on a new
line
Count is increased by one and the process continues up to the level
wherecount is greater than five
Hence the output will be
4
9
16
25
36
49
64
81
100
Q6.
Q7.
Q8.
A.
1) Arithmetic examples addition (+), subtraction (-), division
2) Assignment operator (=) e.g. a=3, x=y, pi=3.142
3) Relational operator e.g. less than (<), greater than (>)
4) Logical operator (&&)-logicalAND, logical OR
B.

More Related Content

Similar to JAMES_[1].docx

introduction of c langauge(I unit)
introduction of c langauge(I unit)introduction of c langauge(I unit)
introduction of c langauge(I unit)Prashant Sharma
ย 
C and CPP Interview Questions
C and CPP Interview QuestionsC and CPP Interview Questions
C and CPP Interview QuestionsSagar Joshi
ย 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1SURBHI SAROHA
ย 
Unit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptxUnit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptxPragatheshP
ย 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1MD SAMIR UDDIN
ย 
C tutorials
C tutorialsC tutorials
C tutorialsAmit Kapoor
ย 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEMMansi Tyagi
ย 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdfThejeswara Reddy
ย 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdfShivamParjapati2
ย 
Unit 1.1 - Introduction to C.pptx
Unit 1.1 - Introduction to C.pptxUnit 1.1 - Introduction to C.pptx
Unit 1.1 - Introduction to C.pptxNandhaGopal Subramani
ย 
C programming
C programmingC programming
C programmingPralhadKhanal1
ย 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)aaravSingh41
ย 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxCoolGamer16
ย 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit orderMalikireddy Bramhananda Reddy
ย 
C language introduction geeksfor geeks
C language introduction   geeksfor geeksC language introduction   geeksfor geeks
C language introduction geeksfor geeksAashutoshChhedavi
ย 

Similar to JAMES_[1].docx (20)

C programming
C programmingC programming
C programming
ย 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
ย 
introduction of c langauge(I unit)
introduction of c langauge(I unit)introduction of c langauge(I unit)
introduction of c langauge(I unit)
ย 
C and CPP Interview Questions
C and CPP Interview QuestionsC and CPP Interview Questions
C and CPP Interview Questions
ย 
Part 1
Part 1Part 1
Part 1
ย 
C programming
C programmingC programming
C programming
ย 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
ย 
Unit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptxUnit 2 CMath behind coding.pptx
Unit 2 CMath behind coding.pptx
ย 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1
ย 
C tutorials
C tutorialsC tutorials
C tutorials
ย 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
ย 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
ย 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
ย 
Unit 1.1 - Introduction to C.pptx
Unit 1.1 - Introduction to C.pptxUnit 1.1 - Introduction to C.pptx
Unit 1.1 - Introduction to C.pptx
ย 
C programming
C programmingC programming
C programming
ย 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
ย 
Chapter 2
Chapter 2Chapter 2
Chapter 2
ย 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptx
ย 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
ย 
C language introduction geeksfor geeks
C language introduction   geeksfor geeksC language introduction   geeksfor geeks
C language introduction geeksfor geeks
ย 

More from Katecate1

import java.uti-WPS Office.docx
import java.uti-WPS Office.docximport java.uti-WPS Office.docx
import java.uti-WPS Office.docxKatecate1
ย 
class Main {-WPS Office.docx
class Main {-WPS Office.docxclass Main {-WPS Office.docx
class Main {-WPS Office.docxKatecate1
ย 
Arithmetic codi-WPS Office.docx
Arithmetic codi-WPS Office.docxArithmetic codi-WPS Office.docx
Arithmetic codi-WPS Office.docxKatecate1
ย 
class Calculate-WPS Office.docx
class Calculate-WPS Office.docxclass Calculate-WPS Office.docx
class Calculate-WPS Office.docxKatecate1
ย 
assino 1WPS Office.doc
assino 1WPS Office.docassino 1WPS Office.doc
assino 1WPS Office.docKatecate1
ย 
Assignment 2-WPS Office(1).doc
Assignment 2-WPS Office(1).docAssignment 2-WPS Office(1).doc
Assignment 2-WPS Office(1).docKatecate1
ย 
import java.io.-WPS Office.docx
import java.io.-WPS Office.docximport java.io.-WPS Office.docx
import java.io.-WPS Office.docxKatecate1
ย 

More from Katecate1 (7)

import java.uti-WPS Office.docx
import java.uti-WPS Office.docximport java.uti-WPS Office.docx
import java.uti-WPS Office.docx
ย 
class Main {-WPS Office.docx
class Main {-WPS Office.docxclass Main {-WPS Office.docx
class Main {-WPS Office.docx
ย 
Arithmetic codi-WPS Office.docx
Arithmetic codi-WPS Office.docxArithmetic codi-WPS Office.docx
Arithmetic codi-WPS Office.docx
ย 
class Calculate-WPS Office.docx
class Calculate-WPS Office.docxclass Calculate-WPS Office.docx
class Calculate-WPS Office.docx
ย 
assino 1WPS Office.doc
assino 1WPS Office.docassino 1WPS Office.doc
assino 1WPS Office.doc
ย 
Assignment 2-WPS Office(1).doc
Assignment 2-WPS Office(1).docAssignment 2-WPS Office(1).doc
Assignment 2-WPS Office(1).doc
ย 
import java.io.-WPS Office.docx
import java.io.-WPS Office.docximport java.io.-WPS Office.docx
import java.io.-WPS Office.docx
ย 

Recently uploaded

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
ย 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
ย 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
ย 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
ย 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
ย 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
ย 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
ย 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
ย 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
ย 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxDavid Douglas School District
ย 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
ย 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
ย 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
ย 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
ย 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
ย 

Recently uploaded (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
ย 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
ย 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
ย 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
ย 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
ย 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
ย 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
ย 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
ย 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
ย 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
ย 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
ย 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
ย 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
ย 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
ย 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
ย 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
ย 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
ย 

JAMES_[1].docx

  • 1. JAMES KILONZO 19/03722 BBIT(YEAR 1 SEM2) Town campus PROGRAMMING CAT Q1. a) Structured programming is an approach to writing programs thatare easier to read, test, debug, and modify. b) C is a portable language because it is not made for a particular platform hence code written in c can be compatible with all machines. It is also efficient becauseof availability of efficient compilers. c) i. The processor directive is included in a programthat begins with the character #, which them different froma typical sourcecode text. ii. Declaration is a statement describing an identifier, such as the name a variable or a function. iii. A Function is a group of statement that together performs a test. A function declaration tells the compilers about a functionโ€™s name, return type, and parameters. iv. An expression is a combination of one or more constants, variable, operators and functions that the programming language interprets together with a computer to produceanother value. v. A comment is a programmerโ€™s readableexplanation or a notation in the sourcecode of a computer program. They are added with a purposemaking of the sourcecode easier for humans to understand. d) ๏ƒ˜ c keywords arepredefined, reserved words used in programming that have special meanings to compiler. They are partof syntaxand they cannot be used as identifier Q2. a. Array variableholds multiple values whereas simple variable holds a single value. b. Data type example size i. Integer e.g. 6,8,10 2bytes
  • 2. ii. Float e.g. 12.3,66.9,7.8 4bytes iii. Character eg.97(in ASCII) 1byte Double e.g. 234.4567 8bytes c. a) A symbolic constantis an identifier that is replaced by replacement text by a processor beforethe programis compiled. it involves the useof #define. b) Itis easier to manage programs Easy to debug errors d. A storageclass represents the visibility and a location of a variable. It describes the features of a variableand how it is stored i. Static - it is a local variablewhich is capable of returning a value even when control is transferred to the function call. ii. Register -used to storevariables. iii. Auto -is a default storageclass for local variable and can only be used with functions. Q3 a) A structureis a user defined data type in c language which allows us to combine data of different types together. b) In Q4 a. 1. Programdesign Itis a foundation for good program.
  • 3. Programdesign is concerned with development and strategy. Itinvolves 4 stages: i. Problem analysis ii. Outlining the programstructure iii. Algorithm development iv. Problem analysis 2. Programcoding Itshould be readable and simple to understand. Elements in coding include: i. Internaldocumentation ii. Construction of statements iii. Generality of program iv. Input/outputformats 3. Programtesting This is the process of reviewing and executing a programwith the intent of detecting errors. Testing should include necessary steps to detect all possibleerrors in a program. Itincludes 2 stages: a) Human testing b) Computer based testing b. I) Linking is necessary to compile only those sources files that have changed for the rest, the objectfiles that are sufficient input for the linker. ii) because of the errors that are generated while executing the programs. c. To check wherehe has written the else statement where it should not have been written. He should also check wherehe has forgotten to put a semicolon at the end of the statement. Q5. a)
  • 4. i. Avoid repetition of codes. Reduces chances of errors. Modifying of a programis easier. Clear programlogic ii. Function prototypeis a declaration of a function that specifies the functionโ€™s name and type of signature. b) #include<stdio.h> Intmax(int a, int b); Intmain () { Inta, b; Printf(โ€œenter the firstand second number:nโ€); Scanf(โ€œ%d%dโ€,&p, &w); Greater_ num= max(a, b) Printf(โ€œthelarger value is n%dโ€, greater _num); Return 0; } int max(int a, int b) { Intvalue; If(a>b) { Value=a; } Else Value =b; Return value; } c) A function is created which multi plays individual numbers together and the function is called into the main functions whereit passes its variables to count.
  • 5. So that when countis 1, the number multi plays itself due to the variables passed into the main function then the productis displayed on the screen using printf function and each number is printed on a new line Count is increased by one and the process continues up to the level wherecount is greater than five Hence the output will be 4 9 16 25 36 49 64 81 100 Q6. Q7. Q8. A. 1) Arithmetic examples addition (+), subtraction (-), division 2) Assignment operator (=) e.g. a=3, x=y, pi=3.142 3) Relational operator e.g. less than (<), greater than (>) 4) Logical operator (&&)-logicalAND, logical OR B.