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
Pre-Processor Directives
Interview Questions and Answer
1. Use of _______ header file provides functions and macros to implement the functionality of variable arguments.
Options:
a. Stdio.h
b. String.h
c. stdarg.h
d. ctype.h
Reveal Answer
2. Which stage the following code #include<stdio.h> gets replaced by the contents of the file stdio.h
Options:
a. During editing
b. During linking
c. During execution
d. During pre-processing
Reveal Answer
3. If the file to be included doesn't exist, the pre-processor displays an error message
Options:
a. True
b. False
Reveal Answer
4. Macro calls and function calls work exactly similarly.
Options:
a. True
b. False
Reveal Answer
5. In a macro call the control is passed to the macro.
Options:
a. True
b. False
Reveal Answer
6. A header file contains macros, structure declaration and function prototypes
Options:
a. True
b. False
Reveal Answer
7. A pre-processor directive is a message from compiler to a linker.
Options:
a. True
b. False
Reveal Answer
8. Once preprocessing is over and the program is sent for the compilation the macros are removed from the expanded source code.
Options:
a. True
b. False
Reveal Answer
9. Preprocessor directive #ifdef .. #else ... #endif is used for conditional compilation.
Options:
a. True
b. False
Reveal Answer
10. Macros with arguments are allowed
Options:
a. True
b. False
Reveal Answer
11. What will be the output of the following program? #include<stdio.h> #define SI(p, n, r) float si; si=p*n*r/100; int main() { float p=2500, r=3.5; int n=3; SI(p, n, r); SI(1500, 2, 2.5); return 0; }
Options:
a. 26250.00 7500.00
b. None
c. Error: Multiple declaration of si
d. Garbage values
Reveal Answer
12. What will be the output of the following program #include<stdio.h> #define PRINT(int) printf("int=%d, ", int); int main() { int x=2, y=3, z=4; PRINT(x); PRINT(y); PRINT(z); return 0; }
Options:
a. int=2, int=3, int=4
b. int=2, int=2, int=2
c. int=3, int=3, int=3
d. int=4, int=4, int=4
Reveal Answer
13. What will be the output of the following program #include<stdio.h> #define MAX(a, b) (a > b ? a : b) int main() { int x; x = MAX(3+2, 2+7); printf("%d\n", x); return 0; }
Options:
a. 8
b. 9
c. 6
d. 5
Reveal Answer
14. What will be the output of the following program #include<stdio.h> #define MESS apple int main() { printf("MESS\n"); return 0; }
Options:
a. Mess
b. MESS
c. Apple
d. Nothing will print
Reveal Answer
15. What will be the output of the following program #include<stdio.h> #define DEF main() { int i=2; #ifdef DEF printf("Square of i=%d",i*i); #else printf("i=%d",i); #endif }
Options:
a. Square of i=4
b. i=2
c. compilation Error
d. None
Reveal Answer
16. What will be the output of the following program? #include<stdio.h> #define MESS(m) printf("m") main() { MESS("Welcome to the world of c"); MESS("C Videos"); }
Options:
a. Welcome to the world of c
b. Welcome to the world of c
c. mm
d. Welcome to the world of c C Videos
Reveal Answer
17. What will be the output of the following program? #define GOTONEXTLINE printf("\n") main() { printf("A Message"); GOTONEXTLINE ; printf("Life"); GOTONEXTLINE ; printf("goes on.."); }
Options:
a. A Message Life Goes on
b. A Message Life
c. A Message Life goes on...
d. A Message goes on.....
Reveal Answer
18. What will be the output of the following program? #define THIS #define THAT main() { #ifdef THIS && THAT printf("Definitions are hard to digest"); #else printf("But once mugges up,hard to forget"); #endif }
Options:
a. No Output
b. Error
c. But once mugges up,hard to forget
d. Definitions are hard to digest
Reveal Answer
19. What will be the output of the following program? #include<stdio.h> #define MEAN(a,b,c,d,e) (a+b+c+d+e)/5 Int main() { int a,b,c,d,e,m; a=1;b=2;c=3;d=4;e=5; m=MEAN(a,b,c,d,e); printf("Mean of the five numbers is=%d",m); }
Options:
a. Mean of the five numbers is=3
b. Mean of the five numbers is=5
c. None
d. Expression Syntax
Reveal Answer
20. What will be the output of the following program? #include<stdio.h> #define COND(a) (a>=65&&a<=90) main() { char ch='R'; if(COND(ch)) printf("ch is in upper case"); else printf("ch is in lower case"); }
Options:
a. ch is in upper case
b. ch is in lower case
c. Expression Syntax
d. None
Reveal Answer
21. What will be the output of the following program #include<stdio.h> #define print(int)printf("%d\n",int) Int main() { int x=3; print(x); }
Options:
a. 3
b. Garbage Value
c. 1
d. 0
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