Buy Discounted Microsoft Exam Voucher
Rs. 5600
OFFER PRICE Rs. 4250/- | Contact: +91 9347458388
Azure Certification
NewBatches/Webinars
Packages
Gold Membership
Bestseller
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
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)
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
AZ-400: Microsoft Azure DevOps
DP-203: Data Engineering on Microsoft Azure
Amazon Web Services (AWS)
Testing Tools
Manual Testing
Selenium Testing with Java(Live Training)
SharePoint
SharePoint 2013
Microsoft Power Platform
Power Platform Suite
Data Analytics using PowerBI (DA-100)
MicroServices
Docker
Kubernetes
Microservices using .NET Core
Others
C and Data Structure
Core Java
OOPs and C++
Advance Java
Python Programming
Complete Azure Training
Pricing
Videos
Resources
AzureA2Z
Deccansoft
Blog
On-Job Tech Support
Wall of Fame
Testimonials
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 Arrays
Interview Questions and Answer
1. Always array size should be -----------?
Options:
a. N
b. N-1
c. N+1
d. N*1
Reveal Answer
2. The array index should starts with
Options:
a. 0
b. 1
c. 2
d. 3
Reveal Answer
3. In which of the following array declaration is correct
Options:
a. int array[];
b. int []array;
c. array int[];
d. none of above
Reveal Answer
4. In which of the following declaration and initialization are correct?
Options:
a. int array[4]={100,200,300,400};
b. int array[]={100 200 300 400};
c. int array={100,200,300,400}
d. int array[3]={100,200,300,400};
Reveal Answer
5. In two dimensional array the two indexes represents [ex: int array[][];]
Options:
a. 1st index represents rows and 2nd index represents blocks.
b. 1st index represents columns and 2nd index represents sub arrays.
c. 1st index represents blocks and 2nd index represents sub arrays.
d. 1st index represents rows and 2nd index represents columns.
Reveal Answer
6. What will be the output of the following program? #include<stdio.h> int main() { int a[5],i; static int b[5]; for(i=0;i<5;i++) { printf("\n%d\t%d\t%d",i,a[i],b[i]); } }
Options:
a. 0 3160 0 1 -1 0 2 8653 0 3 9247 0 4 1912 0
b. 0 0 0 1 0 0 2 2 0 3 0 0 4 0 0
c. 0 0 0 1 0 -1 2 0 316 3 0 5874 4 0 5432
d. 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0
Reveal Answer
7. What will be the output of the above program? #include<stdio.h> int main() { static float arr[]={1.2,12,2.4,24,3.5,35}; int i; for(i=0;i<=5;i++) printf("%f",arr[i]); }
Options:
a. 1.0,12,2.0,24,3.0,35
b. 1.200000 12.00000 2.400000 24.000000 3.500000 35.000000
c. Compilation Error
d. 1.200 12.000 2.4000 24.000 3.5000 35.000
Reveal Answer
8. main() { int arr1[10],arr2[10],i; for(i=0;i<9;i++) { arr1[i]='A'+i; arr2[i]='a'+i; printf("%d\t",arr2[i]-arr1[i]); } } What will be the output of the above program?
Options:
a. 32 32 32 32 32 32 32 32 32
b. A B C D E F G H I J K
c. Compilation error
Reveal Answer
9. #include<stdio.h> main() { static int b[]={10,20,30,40,50}; int i; for(i=0;i<=4;i++) printf("%d\t",i[b]); } What will be the output of the above program?
Options:
a. Syntax Error
b. Compilation Error
c. 10 20 30 40 50
d. Run time error
Reveal Answer
10. In the given program which line of code will shows the error? main() { int arr[25],i; for(i=0;i<=100;i++) { arr[i]=100; printf(“%d”,arr(i)); } }
Options:
a. Compilation Error
b. arr(i)=100
c. In printing statement
d. No output
Reveal Answer
11. What will be the output of the following program? #include<stdio.h> main() { static int n[3][3]={2,4,3, 6,8,5, 3,5,1}; printf("%d\n %d\n %d",n,n[1][1],n[2][2]); }
Options:
a. Garbage value 8 1
b. 2 8 3
c. 4 6 1
d. 4 6 1
Reveal Answer
12. In C, if you pass an array as an argument to a function, what actually gets passed?
Options:
a. Value of elements in array
b. First element of the array
c. Base address of the array
d. Address of the last element of array
Reveal Answer
13. Is it is necessary to declare size of array the array size in the arguments declaration part of the function.
Options:
a. True
b. False
Reveal Answer
14. Which of the following is an example of array?
Options:
a. Derived Types
b. Fundamentals types
c. User-Define types
d. None of above
Reveal Answer
15. Which of the following is correct syntax for initialization of one dimensional array?
Options:
a. Num[3]={0 0 0};
b. Num[3]={0,0,0};
c. Num[3]={0;0;0};
d. None of above
Reveal Answer
16. What will be the output of the following program? #include<stdio.h> int main() { int arr[1]; arr[0]=10; printf("%d\n",0[arr]); }
Options:
a. 1
b. 10
c. 0
d. 6
Reveal Answer
17. The type of elements in an array must be the same.
Options:
a. True
b. False
Reveal Answer
18. When an array is declared, C automatically initializes its element to zero.
Options:
a. True
b. False
Reveal Answer
19. Which of the following is a valid statement?
Options:
a. #define WEEKDAYS 7
b. int array[WEEKDAYS];
c. const int WEEKDAYS = 7;
d. int array[WEEKDAYS] = 7;
e. char array[WEEKDAYS]= {M, T, W, T, F, S, S};
Reveal Answer
20. Accessing an array outside its range is a compile time error.
Options:
a. True
b. False
Reveal Answer
21. A char type variable cannot be used as subscript in an array.
Options:
a. True
b. False
Reveal Answer
22. In C, by default, the first subscript is zero.
Options:
a. True
b. False
Reveal Answer
23. An error occurs when you don’t specify the dimensions of the array at the time of initializing multidimensional array.
Options:
a. True
b. False
Reveal Answer
24. We can use maximum four dimensions for an array.
Options:
a. True
b. False
Reveal Answer
25. In declaring an array, the array size can be a constant or variable or an expression.
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