Become a GOLD member of Deccansoft and get access to 40+ courses!!
NewBatches/Webinars
Packages
Gold Membership
Bestseller
Microsoft Azure Suite & Suite Plus
Power Platform Acadamy
New
Azure DevOps Expert & Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Courses
MS.NET Courses (Includes Live Project)
Complete C#, OOPs and Windows Programing
ASP.NET MVC Online Training
ASP.NET WebForms
ASP.NET Core
WCF incl. Web Services and Remoting
WPF incl. MVVM and Prism
LINQ and Entity Framework
Live Project Training for Developing Enterprise Application
Live Project using Ntier Arch (.NET5 + EF Core + Angular)
Microservices using .NET Core
Gold Membership
CareerStep IT Program
Client-side UI Technologies
Building Static Web Pages using HTML and CSS
JavaScript and HTML DOM
jQuery, AJAX and JSON
Building Interactive Web Pages using HTML5 and CSS3
BootStrap + Live Examples
AngularJS + Live Project
Angular + Typescript
ReactJS
KnockoutJS
Xamarin
SQL Server + MSBI
SQL Server 2017
Querying Data with Transact-SQL(70-761)
SQL Server Integration Service (SSIS)
SQL Server Reporting Service (SSRS)
SQL Service Analysis Service (SSAS)
Cloud Computing / Azure / AWS
AZ-900: Microsoft Azure Fundamentals
Azure Suite (AZ-104+AZ-204+AZ-305+ AZ-500)
AZ-104: Microsoft Azure Administrator
AZ-204: Developing Solutions for Microsoft Azure
AZ-305: Microsoft Azure Architect Technologies and Design
DP-203: Data Engineering on Microsoft Azure
Amazon Web Services (AWS)
DevOps Expert
AZ-400: Microsoft Azure DevOps
Docker by Sandeep Soni
Kubernetes by Sandeep Soni
Docker & Kubernetes by Rahul Rampurkar
IaC Using Terraform
Powershell
Microsoft Power Platform
Microsoft Power Platform
Data Analytics using PowerBI (DA-100)
Testing Tools
Manual Testing
Selenium Testing with Java(Live Training)
Others
Python Programming
C and Data Structure
Core Java
OOPs and C++
Advance Java
Complete Azure Training
Pricing
Videos
Testimonials
Azure Certification
Contact Us
Login
Login or Register
×
Sign In
Register
Forgot Password?
How did you find us
WhatsApp
YouTube
LinkedIn
Facebook
Telegram
Twitter
Google
Referred by Friend
Refresh
Input symbols
By clicking Register, you accept to the
terms and conditions
and that you have read our
privacy policy.
Recover Password
×
Submit
Enquiry Now
Where did you come to know about us
WhatsApp
YouTube
LinkedIn
Facebook
LinkedIn Ad
Email
Twitter
Google
Referred
Other
Refresh
Input symbols
Working with Functions
Interview Questions and Answer
1. Can we have multiple names for functions?
Options:
a. True
b. False
Reveal Answer
2. Can we call one function in another function?
Options:
a. True
b. False
Reveal Answer
3. A function gets defined if the function name is followed by the semicolon?
Options:
a. True
b. False
Reveal Answer
4. Can we call a function from other function any number of times?
Options:
a. True
b. False
Reveal Answer
5. Default return type for a function is?
Options:
a. void
b. int
c. float
d. No return type
Reveal Answer
6. In the below program what will be the error when you execute it? #include<stdio.h> #include<conio.h> prod(x, y, z); void main() { int a,b,c,p; a=b=c=5; p=prod(a,b,c); printf("p=%d",p); } int prod(int x,int y,int z) { int p; p=x*y*z; return (p); }
Options:
a. Syntax error
b. Run time error
c. Compilation error
d. None of above
Reveal Answer
7. Does a function execute all the statements even though it is not called by other function
Options:
a. True
b. False
Reveal Answer
8. What will be the output of above program if number is 5 #include<stdio.h> int main() { int num,count; printf("\nEnter a number:"); scanf("%d",&num); count=interrupt(num); if(count==2) printf("%d is a prime number",num); else printf("%d is not a prime number",num); return 0; } int interrupt(int num) { int i,count=0; for(i=1;i<=num;i++) { if(num%i==0) count++; } return count; }
Options:
a. Prime number,5
b. Not a prime number,5
c. Compilation number
d. Runtime error
Reveal Answer
9. what will be the output of above program? #include<stdio.h> #include<conio.h> int check(int ch) ; int main() { int i=45; float c; c=check(i); printf("ch=%f",c); } int check(int ch) { float f; f=(ch>=45) ? 3.14 :6.28; return f; }
Options:
a. 3
b. 3.14
c. 3.00
d. 3.00000
Reveal Answer
10. What will be the output of above program? #include<stdio.h> float areacircle(float r); main() { int area; float radius=2.0; area=areacircle(radius); printf("area=%f",area); return 0; } float areacircle(float r) { float a; a=3.14*r*r; printf("a=%f\n",a); return (a); }
Options:
a. a=125,area=12
b. a=125..5,area=12.0
c. a=12.560000,area=0.000000
d. a=12.500 ,area=12.500
Reveal Answer
11. What will be the output of the following program? main() { if(printf("C for yourself how it works\n")); main(); }
Options:
a. Prints message infinite number of times
b. No output
c. Repetitively printing the message
Reveal Answer
12. What will be the output of the following program? printit(int a,char ch); int main() { char a=65,ch='C'; printit(a,ch); } printit(int a,char ch) { printf("a=%d h=%c",a,ch); }
Options:
a. 65,C
b. C,65
c. C,C
d. c,c
Reveal Answer
13. What will be the output of the following program? #include<stdio.h> int main() { int z=4; printf("%d",printf("%d %d",z,z)); }
Options:
a. 44 3
b. 4 4 3
c. 443
d. 4 43
Reveal Answer
14. Subprograms are referred to as ‘functions’.
Options:
a. True
b. False
Reveal Answer
15. Function type sends values to a calling function. Parameter list (arguments) specifies type of value to be return to a calling function
Options:
a. True
b. False
Reveal Answer
16. User can pass any number of values to called function, but called function can only return one value per call.
Options:
a. True
b. False
Reveal Answer
17. The statement "return;" is used to transfer the value back to the calling function.
Options:
a. True
b. False
Reveal Answer
18. The scope of a variable affects a variable's lifetime.
Options:
a. True
b. False
Reveal Answer
Packages
Gold Membership
Microsoft Azure Suite &Suite Plus
Azure DevOps Expert &Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Resources
Blog
Deccansoft
AzureA2Z
Wall of Fame
On-Job Tech Support
About
About BestDotNetTraining
About Trainer
Testimonials
FAQ
Other links
About Us
Contact Us
Leave us a feedback
Sitemap
Privacy Policy
Terms & Conditions
Proudly Powered by