SlideShare a Scribd company logo
Notes of Important programming Fundamental
Questions
Functions
What is a function?
A function is a named block of code that performs some action. The statement written in a function
are executed when is called by the name. Each function has a unique name. Functions are the
building blocks of C++ programs. Functions are easier to write, modify and maintain. Functions
can be reused and reduces programming time.
What is function header?
The first line of function definition is known as function header. The function header consists of
return type, function name and parameter.
What is function body?
The set of statements which are executed inside the function is known as function body. The body
of function appears after function header. The statements are written in curly braces {}. The
variable declaration and program logic are implemented in function body.
What is function declaration or function prototype?
Function declaration is a model of a function. It is also known function prototype. It provides
information to compiler about the structure of the function to be used in program. It consists of
function name, function return type and number and type of parameters. It is terminated with
semicolon.
What is a function called?
The statements that activate s a function is known as function call. A function is called its name.
Function name is followed by necessary parameters in parentheses s. If there are many parameters,
these are separated by commas.
What is local variable?
A variable declared inside a function is known as local variable. Local variable can be used only
in the function in which it is declared. The lifetime of local variable starts when control enters
the function in which it is declared. Local variable is automatically destroyed when control exist
function.
What is global variable?
A variable declared outside any function is known as global variable. Global variable can be used
by all functions in the program. Global variable exist in the memory as long as the program is
running. These variables are destroyed from the memory when the program terminates.
What is scope of local variable?
The area where a variable can be accessed is known as scope of variable. Local variable can be
used only in the function in which it is declared. If a statement accesses a local variable that is
not in scope, the compiler generates a syntax error.
What is scope of global variable?
Global variable can be used by all functions in the program. It means that these variables are
globally accessed from any part of the program. Normally, global variables are declared before
main function.
What is lifetime of local variable?
The time period for which a variable exist in the memory is known as the lifetime of variable.
Differen t types of variable have different lifetime.
The lifetime of local variable starts when the control enters the function in which it is declared.
Local variable is automatically destroyed when the control exists from the function and its lifetime
ends. When the lifetime of a local variable ends, the value stored in this variable also becomes
inaccessible.
What is lifetime of global variable?
Global variables exist in the memory as long as the program is running. These variables are
destroyed from the memory when the program terminates. These variables occupy memory longer
than local variables. So, global variables should be used only when these are very necessary.
Arrays
Define an array?
An array is a group of consecutive memory locations with same name and type. All these
Memory locations have one collective name and type. The memory locations in the array are
known as elements of array. The total number of elements in the array is called its length.
How an element is accessed in array?
Each element in the array is accessed with reference to its position of location in the array. The
position is called index or subscript. The index of first element is 0 and index of last element is
length -1. The value of the index is written in brackets along with the name of array.
How subscript variables are written?
A subscript variable is written in brackets [] with arrayname.
Distinguish between1 -D array and 2 -D array?
1-D array consists of only single row or single column. Each element of this array can be
accessed using one index value. 2-D array consists of multiple row and columns. Each element of
this array is accessed using two index value.
Explain array manipulation?
The process of performing different operations on array is calledarray manipulation. Different
operations can be performed using array such as finding an element, comparing two arrays,
finding the minimum or maximum value in array and sorting an array etc.

More Related Content

What's hot

Functions in Python
Functions in PythonFunctions in Python
Functions in Python
Shakti Singh Rathore
 
Notes: Verilog Part 5 - Tasks and Functions
Notes: Verilog Part 5 - Tasks and FunctionsNotes: Verilog Part 5 - Tasks and Functions
Notes: Verilog Part 5 - Tasks and Functions
Jay Baxi
 
Intro To Scala
Intro To ScalaIntro To Scala
Intro To Scala
chambeda
 
Python Built-in Functions and Use cases
Python Built-in Functions and Use casesPython Built-in Functions and Use cases
Python Built-in Functions and Use cases
Srajan Mor
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
Mohammed Sikander
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilog
Nallapati Anindra
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 FunctionDeepak Singh
 
Introduction To Programming with Python-1
Introduction To Programming with Python-1Introduction To Programming with Python-1
Introduction To Programming with Python-1
Syed Farjad Zia Zaidi
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
Aniket Thakur
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
Talha Ocakçı
 
Keywords in python
Keywords in pythonKeywords in python
Keywords in python
PushpakBhoge
 
Operators in java
Operators in javaOperators in java
Operators in java
Madishetty Prathibha
 
Handout # 4 functions + scopes
Handout # 4   functions + scopes Handout # 4   functions + scopes
Handout # 4 functions + scopes
NUST Stuff
 
functions
functionsfunctions
functions
Itishree Soni
 
Python Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowPython Programming - III. Controlling the Flow
Python Programming - III. Controlling the Flow
Ranel Padon
 
PHP = PHunctional Programming
PHP = PHunctional ProgrammingPHP = PHunctional Programming
PHP = PHunctional Programming
Luis Atencio
 
Variable scope in php
Variable scope in phpVariable scope in php
Variable scope in php
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Functions assignment
Functions assignmentFunctions assignment
Functions assignment
Ahmad Kamal
 
Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2
DanWooster1
 
Operators in java By cheena
Operators in java By cheenaOperators in java By cheena
Operators in java By cheena
Chëëñå Båbü
 

What's hot (20)

Functions in Python
Functions in PythonFunctions in Python
Functions in Python
 
Notes: Verilog Part 5 - Tasks and Functions
Notes: Verilog Part 5 - Tasks and FunctionsNotes: Verilog Part 5 - Tasks and Functions
Notes: Verilog Part 5 - Tasks and Functions
 
Intro To Scala
Intro To ScalaIntro To Scala
Intro To Scala
 
Python Built-in Functions and Use cases
Python Built-in Functions and Use casesPython Built-in Functions and Use cases
Python Built-in Functions and Use cases
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilog
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 Function
 
Introduction To Programming with Python-1
Introduction To Programming with Python-1Introduction To Programming with Python-1
Introduction To Programming with Python-1
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
 
Keywords in python
Keywords in pythonKeywords in python
Keywords in python
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Handout # 4 functions + scopes
Handout # 4   functions + scopes Handout # 4   functions + scopes
Handout # 4 functions + scopes
 
functions
functionsfunctions
functions
 
Python Programming - III. Controlling the Flow
Python Programming - III. Controlling the FlowPython Programming - III. Controlling the Flow
Python Programming - III. Controlling the Flow
 
PHP = PHunctional Programming
PHP = PHunctional ProgrammingPHP = PHunctional Programming
PHP = PHunctional Programming
 
Variable scope in php
Variable scope in phpVariable scope in php
Variable scope in php
 
Functions assignment
Functions assignmentFunctions assignment
Functions assignment
 
Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2
 
Operators in java By cheena
Operators in java By cheenaOperators in java By cheena
Operators in java By cheena
 

Similar to Notes of Important Programming Fundamental Questions

04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx
Manas40552
 
Functions-Computer programming
Functions-Computer programmingFunctions-Computer programming
Functions-Computer programming
nmahi96
 
Chapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.pptChapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.ppt
AmanuelZewdie4
 
Chapter-3 Scoping.pptx
Chapter-3 Scoping.pptxChapter-3 Scoping.pptx
Chapter-3 Scoping.pptx
JebasudhaKingston1
 
Storage classess of C progamming
Storage classess of C progamming Storage classess of C progamming
Storage classess of C progamming
Appili Vamsi Krishna
 
Java script function
Java script functionJava script function
Java script function
suresh raj sharma
 
functions new.pptx
functions new.pptxfunctions new.pptx
functions new.pptx
bhuvanalakshmik2
 
Function in C++
Function in C++Function in C++
Function in C++
Prof Ansari
 
Storage Classes and Functions
Storage Classes and FunctionsStorage Classes and Functions
Storage Classes and FunctionsJake Bond
 
FUNCTIONS.pptx
FUNCTIONS.pptxFUNCTIONS.pptx
FUNCTIONS.pptx
KalashJain27
 
Ch-5.pdf
Ch-5.pdfCh-5.pdf
Ch-5.pdf
Ch-5.pdfCh-5.pdf
Lecture 11 - Functions
Lecture 11 - FunctionsLecture 11 - Functions
Lecture 11 - Functions
Md. Imran Hossain Showrov
 
Functions in Python.pdfnsjiwshkwijjahuwjwjw
Functions in Python.pdfnsjiwshkwijjahuwjwjwFunctions in Python.pdfnsjiwshkwijjahuwjwjw
Functions in Python.pdfnsjiwshkwijjahuwjwjw
MayankSinghRawat6
 
Functions in c
Functions in cFunctions in c
Functions in c
SunithaVesalpu
 
Userdefined functions brief explaination.pdf
Userdefined functions brief explaination.pdfUserdefined functions brief explaination.pdf
Userdefined functions brief explaination.pdf
DeeptiMalhotra19
 
Functions-.pdf
Functions-.pdfFunctions-.pdf
Functions-.pdf
arvdexamsection
 
Golang online course
Golang online courseGolang online course
Golang online course
bestonlinecoursescoupon
 
C interview questions
C interview  questionsC interview  questions
C interview questions
Kuntal Bhowmick
 

Similar to Notes of Important Programming Fundamental Questions (20)

04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx
 
Functions-Computer programming
Functions-Computer programmingFunctions-Computer programming
Functions-Computer programming
 
Chapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.pptChapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.ppt
 
Chapter-3 Scoping.pptx
Chapter-3 Scoping.pptxChapter-3 Scoping.pptx
Chapter-3 Scoping.pptx
 
Storage classess of C progamming
Storage classess of C progamming Storage classess of C progamming
Storage classess of C progamming
 
Java script function
Java script functionJava script function
Java script function
 
functions new.pptx
functions new.pptxfunctions new.pptx
functions new.pptx
 
Function in C++
Function in C++Function in C++
Function in C++
 
Storage Classes and Functions
Storage Classes and FunctionsStorage Classes and Functions
Storage Classes and Functions
 
FUNCTIONS.pptx
FUNCTIONS.pptxFUNCTIONS.pptx
FUNCTIONS.pptx
 
Ch-5.pdf
Ch-5.pdfCh-5.pdf
Ch-5.pdf
 
Ch-5.pdf
Ch-5.pdfCh-5.pdf
Ch-5.pdf
 
Lecture 11 - Functions
Lecture 11 - FunctionsLecture 11 - Functions
Lecture 11 - Functions
 
Functions in Python.pdfnsjiwshkwijjahuwjwjw
Functions in Python.pdfnsjiwshkwijjahuwjwjwFunctions in Python.pdfnsjiwshkwijjahuwjwjw
Functions in Python.pdfnsjiwshkwijjahuwjwjw
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Userdefined functions brief explaination.pdf
Userdefined functions brief explaination.pdfUserdefined functions brief explaination.pdf
Userdefined functions brief explaination.pdf
 
Functions-.pdf
Functions-.pdfFunctions-.pdf
Functions-.pdf
 
Golang online course
Golang online courseGolang online course
Golang online course
 
C interview questions
C interview  questionsC interview  questions
C interview questions
 
Pc module1
Pc module1Pc module1
Pc module1
 

More from Adeel Rasheed

Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)
Adeel Rasheed
 
Religious Conflict
Religious ConflictReligious Conflict
Religious Conflict
Adeel Rasheed
 
R Studio (Report)
R Studio (Report)R Studio (Report)
R Studio (Report)
Adeel Rasheed
 
History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)
Adeel Rasheed
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
Zooming and Its Types
Zooming and Its TypesZooming and Its Types
Zooming and Its Types
Adeel Rasheed
 
User Interface & Its Types
User Interface & Its TypesUser Interface & Its Types
User Interface & Its Types
Adeel Rasheed
 
Questions About Android Application Development
Questions About Android Application DevelopmentQuestions About Android Application Development
Questions About Android Application Development
Adeel Rasheed
 
Human and Machine Learning
Human and Machine LearningHuman and Machine Learning
Human and Machine Learning
Adeel Rasheed
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
Adeel Rasheed
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
Adeel Rasheed
 
Computer Crime
Computer CrimeComputer Crime
Computer Crime
Adeel Rasheed
 
Privacy and Security Information
Privacy and Security InformationPrivacy and Security Information
Privacy and Security Information
Adeel Rasheed
 
Code of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & StandardsCode of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & Standards
Adeel Rasheed
 
Self Adaptive Systems
Self Adaptive SystemsSelf Adaptive Systems
Self Adaptive Systems
Adeel Rasheed
 
Ethernet - LAN
Ethernet - LANEthernet - LAN
Ethernet - LAN
Adeel Rasheed
 
Synchronous and Asynchronous Transmission
Synchronous and Asynchronous TransmissionSynchronous and Asynchronous Transmission
Synchronous and Asynchronous Transmission
Adeel Rasheed
 
Classes and Objects in C#
Classes and Objects in C#Classes and Objects in C#
Classes and Objects in C#
Adeel Rasheed
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
Adeel Rasheed
 
Applications of Computer
Applications of ComputerApplications of Computer
Applications of Computer
Adeel Rasheed
 

More from Adeel Rasheed (20)

Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)
 
Religious Conflict
Religious ConflictReligious Conflict
Religious Conflict
 
R Studio (Report)
R Studio (Report)R Studio (Report)
R Studio (Report)
 
History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
 
Zooming and Its Types
Zooming and Its TypesZooming and Its Types
Zooming and Its Types
 
User Interface & Its Types
User Interface & Its TypesUser Interface & Its Types
User Interface & Its Types
 
Questions About Android Application Development
Questions About Android Application DevelopmentQuestions About Android Application Development
Questions About Android Application Development
 
Human and Machine Learning
Human and Machine LearningHuman and Machine Learning
Human and Machine Learning
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 
Computer Crime
Computer CrimeComputer Crime
Computer Crime
 
Privacy and Security Information
Privacy and Security InformationPrivacy and Security Information
Privacy and Security Information
 
Code of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & StandardsCode of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & Standards
 
Self Adaptive Systems
Self Adaptive SystemsSelf Adaptive Systems
Self Adaptive Systems
 
Ethernet - LAN
Ethernet - LANEthernet - LAN
Ethernet - LAN
 
Synchronous and Asynchronous Transmission
Synchronous and Asynchronous TransmissionSynchronous and Asynchronous Transmission
Synchronous and Asynchronous Transmission
 
Classes and Objects in C#
Classes and Objects in C#Classes and Objects in C#
Classes and Objects in C#
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
 
Applications of Computer
Applications of ComputerApplications of Computer
Applications of Computer
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 

Recently uploaded (20)

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 

Notes of Important Programming Fundamental Questions

  • 1. Notes of Important programming Fundamental Questions Functions What is a function? A function is a named block of code that performs some action. The statement written in a function are executed when is called by the name. Each function has a unique name. Functions are the building blocks of C++ programs. Functions are easier to write, modify and maintain. Functions can be reused and reduces programming time. What is function header? The first line of function definition is known as function header. The function header consists of return type, function name and parameter. What is function body? The set of statements which are executed inside the function is known as function body. The body of function appears after function header. The statements are written in curly braces {}. The variable declaration and program logic are implemented in function body. What is function declaration or function prototype? Function declaration is a model of a function. It is also known function prototype. It provides information to compiler about the structure of the function to be used in program. It consists of function name, function return type and number and type of parameters. It is terminated with semicolon. What is a function called? The statements that activate s a function is known as function call. A function is called its name. Function name is followed by necessary parameters in parentheses s. If there are many parameters, these are separated by commas. What is local variable? A variable declared inside a function is known as local variable. Local variable can be used only in the function in which it is declared. The lifetime of local variable starts when control enters the function in which it is declared. Local variable is automatically destroyed when control exist function. What is global variable? A variable declared outside any function is known as global variable. Global variable can be used by all functions in the program. Global variable exist in the memory as long as the program is running. These variables are destroyed from the memory when the program terminates. What is scope of local variable?
  • 2. The area where a variable can be accessed is known as scope of variable. Local variable can be used only in the function in which it is declared. If a statement accesses a local variable that is not in scope, the compiler generates a syntax error. What is scope of global variable? Global variable can be used by all functions in the program. It means that these variables are globally accessed from any part of the program. Normally, global variables are declared before main function. What is lifetime of local variable? The time period for which a variable exist in the memory is known as the lifetime of variable. Differen t types of variable have different lifetime. The lifetime of local variable starts when the control enters the function in which it is declared. Local variable is automatically destroyed when the control exists from the function and its lifetime ends. When the lifetime of a local variable ends, the value stored in this variable also becomes inaccessible. What is lifetime of global variable? Global variables exist in the memory as long as the program is running. These variables are destroyed from the memory when the program terminates. These variables occupy memory longer than local variables. So, global variables should be used only when these are very necessary. Arrays Define an array? An array is a group of consecutive memory locations with same name and type. All these Memory locations have one collective name and type. The memory locations in the array are known as elements of array. The total number of elements in the array is called its length. How an element is accessed in array? Each element in the array is accessed with reference to its position of location in the array. The position is called index or subscript. The index of first element is 0 and index of last element is length -1. The value of the index is written in brackets along with the name of array. How subscript variables are written? A subscript variable is written in brackets [] with arrayname. Distinguish between1 -D array and 2 -D array? 1-D array consists of only single row or single column. Each element of this array can be accessed using one index value. 2-D array consists of multiple row and columns. Each element of this array is accessed using two index value. Explain array manipulation?
  • 3. The process of performing different operations on array is calledarray manipulation. Different operations can be performed using array such as finding an element, comparing two arrays, finding the minimum or maximum value in array and sorting an array etc.