Q.1

When we mention the prototype of a function?

  • Defining
  • Declaring
  • Prototyping
  • Calling
Q.2

Point out the error in the following program (if it is compiled with Turbo C compiler).

#include<stdio.h>
int main()
{
    display();
    return}
void display()
{
    printf("IndiaBIX.com");
}
  • No error
  • display() doesn't get invoked
  • display() is called before it is defined
  • None of these
Q.3

1 : typedef long a;
extern int a c;
2 : typedef long a;
extern a int c;
3 : typedef long a;
extern a c;
  • 1 correct
  • 2 correct
  • 3 correct
  • 1, 2, 3 are correct
Q.4

Which of the declaration is correct?

  • int length;
  • char int;
  • int long;
  • float double;
Q.5

Size of short integer and long integer would vary from one platform to another.

  • True
  • False
Q.6

A long double can be used if range of a double is not enough to accommodate a real number.

  • True
  • False
Q.7

Is there any difference in the following declarations?
int myfun(int arr[]);
int myfun(arr[20]);

  • Yes
  • No
Q.8

Point out the error in the following program.

#include<stdio.h>
int main()
{
    void v =
    printf("%d", v);

    return}
  • Error: Declaration syntax error 'v' (or) Size of v is unknown or zero.
  • Program terminates abnormally.
  • No error.
  • None of these.
Q.9

Which of the following operations are INCORRECT?

  • int i = 35; i = i%5;
  • short int j = 255; j = j;
  • long int k = 365L; k = k;
  • float a = 3.14; a = a%3;
Q.10

Range of float id -2.25e+to 2.25e+308

  • True
  • False
Q.11

A float is 4 bytes wide, whereas a double is 8 bytes wide.

  • True
  • False
Q.12

Suppose a program is divided into three files ff2 and f3, and a variable is defined in the file f1 but used in files f2 and f3. In such a case would we need the extern declaration for the variables in the files f2 and f3?

  • Yes
  • No
Q.13

Point out the error in the following program.

#include<stdio.h>
struct emp
{
    char name[20];
    int age;
};
int main()
{
    emp int xx;
    int a;
    printf("%d\n", &a);
    return}
  • Error: in printf
  • Error: in emp int xx;
  • No error.
  • None of these.
Q.14

Which of the following correctly represents a long double constant?

  • 6.68
  • 6.68L
  • 6.68f
  • 6.68LF
Q.15

If the definition of the external variable occurs in the source file before its use in a particular function, then there is no need for an extern declaration in the function.

  • True
  • False
Q.16

Size of short integer and long integer can be verified using the sizeof() operator.

  • True
  • False
Q.17

Global variable are available to all functions. Does there exist a mechanism by way of which it available to some and not to others.

  • Yes
  • No
Q.18

Which of the following is correct about err used in the declaration given below?

 typedef enum error { warning, test, exception } err;
  • It is a typedef for enum error.
  • It is a variable of type enum error.
  • The statement is erroneous.
  • It is a structure.
Q.19

Which of the structure is incorrcet?

1 :
struct aa
{
    int a;
    float b;
};
2 :
struct aa
{
    int a;
    float b;
    struct aa var;
};
3 :
struct aa
{
    int a;
    float b;
    struct aa *var;
};
  • 1
  • 2
  • 3
  • 1, 2, 3
Q.20

Range of double is -1.7e-to 1.7e+(inbit platform - Turbo C under DOS)

  • True
  • False
0 h : 0 m : 1 s