July 5, 2021 in C and CPP
The CONTINUE statement cannot be used with
1.8 The CONTINUE statement cannot be used with
A) for
B) switch
C) do
D) while
July 5, 2021 in C and CPP
1.8 The CONTINUE statement cannot be used with
A) for
B) switch
C) do
D) while
July 5, 2021 in C and CPP
1.7 An expression contains assignment, relational and arithmetic operators. If parentheses
are not specified, the order of evaluation of the operators would be:
A) assignment, arithmetic, relational
B) relational, arithmetic, assignment
C) assignment, relational, arithmetic
D) arithmetic, relational, assignment
July 5, 2021 in C and CPP
1.6 How long the following loop runs:
for (x=0; x=3; x++)
A) Three time
B) Four times
C) Forever
D) Never
July 5, 2021 in C and CPP
1.5 Data type of the controlling statement of a SWITCH statement cannot of the type:
A) int
B) char
C) short
D) float
July 5, 2021 in C and CPP
1.4 What is the output of the following program segment?
#include<stdio.h>
main()
{
int i=10, m=10;
clrscr();
printf(“%d”, i>m?i*i:m/m,20);
getch();
}
A) 20
B) 1
C) 120
D) 100 20
July 5, 2021 in C and CPP
1.3 The size of a character variable in ‘C’ is
A) 4 byte
B) 8 bytes
C) 16 bytes
D) None of the above
July 5, 2021 in C and CPP
1.2 Built-in data structures in ‘C’ are
A) Arrays
B) Structures
C) Files
D) All of the above
July 5, 2021 in C and CPP
1.1 The operator & is used for
A) Bitwise AND
B) Bitwise OR
C) Logical AND
D) Logical OR
July 5, 2021 in C and CPP
a) How can a procedure be defined in ‘C’? Give an example. Bring out the differences
between function and procedure.
b) Draw a flowchart and then develop an interactive ‘C’ program which finds whether a
given integer number is prime or not. Make use of a function subprogram.
July 5, 2021 in C and CPP
c) What is a structure? How does a structure differ from a union? Give examples. For what
kind of applications, union data structure is useful? How are arrays different from
structure?