PRACTICE QUESTION

1.what is the size of an int data type?

1.       4 byte

2.       8 byte

3.       Depends on the system compiler

4.       Can not be determined

2.which of the following is a user defined data types?

1.       Typedef int Boolean;

2.       Struct {char name[10], int age};

3.       All of the mentioned

4.       Typedef enum {mon, tue, wed, thu, fri} workdays;

3.what is short int in C programing?

1.       Qualifier

2.       All of the mentioned

3.       Short is the qualifier and int is the basic data type

4.       The basic data type of C

4.the format identifier ‘%i’ is also used for__________ data type.

1.       Int

2.       Char

3.       Float

4.       Double

5.which data type is most suitable for storing a number 65000 in a n32-bit system?

1.       Signed short

2.       Unsigned short

3.       Long

4.       Int

1.which of the following is true for variable names in c?

1.       They can contain alfhanumeric characters as well as special characters

2.       Variable can be of any length

3.       Variable name can not start with a digit

4.       It is  not an error to declare a variable to be one of keyword 

2.all keywords in C are in__________

1.       None of the mentioned

2.       Upper case letters

3.       Lower case letters

4.       Camel case letters

3.which of the following is not a valid C variable name?

1.       int variable_count

2.       int $main

3.       int number

4.       float rate

4.which is valid C expression?

1.       int my_num = 100,000;

2.       int $my_num = 10000;

3.       int my_num = 100000;

4.       int my num = 1000;

5.what will be the output of the following C code?

#include<stdio.h>

int main()

{

  int y = 10000;

  int y=34;

  printf(“hello word %d\n”, y);

 

1.       hello word 34

2.       hello word 10000

3.       compile time error

4.       hello word followed by a junk value

6.which of the following can not be a variable name in C?

1.       true

2.       volatile

3.       export

4.       friend