You are on page 1of 8

Test Paper

Name: Date:
Please tick √ on correct option(s). Total marks: 40

Basic Electronics [13 Marks]

1). Why is it important to maintain an impedence match from the source to the load [1 M]
when sending signals?
a). to reduce external noise b). to keep the line balanced
c). to reduce reflected energy d). to reduce attenuation

2). Refer to figure [1 M]

230V AC
50Hz

A voltage level of 20V is measured at the output of the power supply with
no load attached.
Which of the following is the probable cause?
a). R2 shorted b). C1 open
c). D1 shorted d). Z2 open

3). Output resistance of ideal OPAMP is: [1 M]


a). 0 b). 1
c). infinite d). very high

4). Capacitance between AB is equal to [1 M]

a). 12 pf b). 9 pf
c). 0.75 pf d). 1.33 pf

5). Refer the figure: [1 M]


In this circuit, what is the function of the inductor?
a). high pass filter b). low pass filter
c). band pass filter d). band stop filter

6). What is the relationship between current(I) and voltage (E) in a circuit consisting of a [1 M]
capacitor in series with a resistor?
a). I and E in phase across the capacitor.
b). I leads E across the resistor.
c). E leads I across the capacitor
d). I and E are in phase across the resistor.

7). Frequency response of intergrator is same as that of __________ . [1 M]


a). high pass filter
b). low pass filter
c). band pass filter

8). RFI- [2 M]
9). ALE-
10). UART-
11). SCR-

12). Draw the symbol of tunnel diode and p-channel mosfet: [1 M]

Tunnel diode P-channel MOSFET


13). Give the colour code for 110 Ohms resistor [1 M]

14).Which mode of operation is exhibited by RS-485 standard? [1 M]


a). Single ended
b). Differential
c). Both a and b
d). None of the above
15). [1 M]

Decreasing the gain in the given circuit could be achieved by:


a). reducing the amplitude of the input vtg
b). increasing the value of the feedbck resistor
c). increasing the value of the input resistor
d). removing the feedback resistor

Digital Electronics [4 Marks]

1). Which bitwise operator is suitable for turning ON a particular bit in a number? [1 M]
a). && operator b). & operator
c). | | operator d). | operator

2). A negative edge-triggerd flip-flop will accept inputs only when the clock is LOW. [1 M]
a). True b). False

3). By adding inverters to the inputs and output of a AND gate, we can obtain....... [1 M]
a). OR b). AND
c). NOT d). X-OR

4). Which logic gate has output high if and only if all inputs are low? [1 M]
a). NOR b). NAND
c). X-NOR d). AND

C programming [23 Marks]

1).Using the variable a, give definitions for the following: [2 M]

a).A pointer to a function that takes an integer as an argument and returns an integer
b).An array of ten pointers to functions that take an integer argument and return an
integer

2). Given an integer variable a, write two code fragments. The first should set bit 3 of a. [2 M]
The second should clear bit 3 of a. In both cases, the remaining bits should be
unmodified.

3). Write C programs for the following:


a).Concatenate two strings without using library functions. [3 M]

b). Find highest and lowest number in the following array: [3 M]


a[8] = {10,4,67,1,0,44,59,8}
c). Swap address of two variables using pointer [3 M]

4). What will be the output of the following C code? [1 M]
#include <stdio.h>
int main()
{
enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
printf("PEACH = %d\n", PEACH);
}
a) PEACH = 3
b) PEACH = 4
c) PEACH = 5
d) PEACH = 6
5). Which of the following declaration is illegal? [1 M]

a) char *str = “Best C programming classes”;


b) char str[] = “Best C programming classes”;
c) char str[20] = “Best C programming classes”;
d) char[] str = “Best C programming classes”;

6). What will be the output of the following C code? [1 M]
#include <stdio.h>
void main()
{
int k = 4;
float k = 4;
printf("%d", k)
}
a) Compile time error
b) 4
c) 4.0000000
d) 4.4

7). What will be the output of the following C code? [1 M]
#include <stdio.h>
void main()
{
int x = 1, y = 0, z = 5;
int a = x && y || z++;
printf("%d", z);
}
a) 6
b) 5
c) 0
d) Varies

8). What will be the output of the following C code? [1 M]
#include <stdio.h>
void main()
{
double x = 123828749.66;
int y = x;
printf("%d\n", y);
printf("%lf\n", y);
}
a) 0, 0.0
b) 123828749, 123828749.66
c) 12382874, 12382874.0
d) 123828749, 0.000000
9). What will be the output of the following C code? [1 M]
#include <stdio.h>
int main()
{
int c = 2 ^ 3;
printf("%d\n", c);
}

a) 1
b) 8
c) 9
d) 0

10). What will be the output of the following C code? [1 M]
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
a) hi
b) hello
c) no
d) none of the mentioned

11). What will be the output of the following C code? [1 M]


#include <stdio.h>
#define max(a) a
int main()
{
int x = 1;
switch (x)
{
case max(2):
printf("yes\n");
case max(1):
printf("no\n");
break;
}
}
a) yes no
b) yes
c) no
d) Compile time error

12). What will be the output of the following C code? [1 M]


#include <stdio.h>
int main()
{
int i = 0, j = 0;
while (i < 5, j < 10)
{
i++;
j++;
}
printf("%d, %d\n", i, j);
}

a) 5, 5
b) 5, 10
c) 10, 10
d) Syntax error

13). What will be the output of the following C code? [1 M]


#include <stdio.h>
int main()
{
char *str = "hello, world";
char *str1 = "hello, world";
if (strcmp(str, str1))
printf("equal");
else
printf("unequal");
}

a) equal
b) unequal
c) Compilation error
d) Depends on the compiler

You might also like