Welcome to www.mcqtutorial.com!!!!
      
      
MCQ Tutorial Search
Home Search Add Question Today's History Discussion Board Job Portal C

C Basics

Mock Test Contact Feedback
Home
Search
Add Question
Today's History
Discussion Board
Job Portal
C

C Basics

Mock Test
Subscribe/Unsubscribe
Email:
Social Media
Facebook

Misc Tutorials

References

Question and Answer Tutorial
Tutorials Point
Stack Overflow

MCQ Tutorial - C->C Basics

First Previous 1 2 3 4 Next Last
11.) What is the output of following code?

    #include 
    int main()
    {
     int a[5] = {1, 2, 3, 4, 5};
     int i;
     for (i = 0; i < 5; i++)
       if ((char)a[i] == '5')
              printf("%d
", a[i]);
       else
              printf("FAIL
");11.    
     }
Options are:
A.) Print FAIL for 5 times
B.) The compiler will flag an error
C.) Print the ASCII value of 5
D.) Print the output 5
12.) For which data type the format identifier %i is also used?
Options are:
A.) float
B.) int
C.) double
D.) char
                        
13.) Which data type is most suitable for storing a number 65000 in a 32-bit system?

Options are:
A.) double
B.) int
C.) long
D.) short
14.) Which is not a User-defined data type from following?
Options are:
A.) struct {char name[10], int age};
B.) typedef int Boolean;
C.) typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;
D.) int
15.) What is the size of an int data type?
Options are:
A.) 4 Byte
B.) Machine dependent
C.) Can not be determined
D.) 8 Byte
First Previous 1 2 3 4 Next Last
Comment:
Name:Email:
Contact No.:
Copyright © 2014 by SBJ Group. All Rights Reserved. Developed and maintained by SBJ Group. Supported on Internet Explorer browser only