1.
Value on the output is: _____
2. Please recognize the name of this element and put the value to the table.
NAME: _______
Input A Input B Output C
A 0 0
C
B 0 1
1 0
1 1
3. Please write dec results below:
I. 0x3A =
II. 1111b =
III. 01010101b =
4. What will be on the output:
#include <stdio.h>
int main() {
int x = 20, y = 35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d", x, y);
return 0;
}
5. What will be on the output:
#include <stdio.h>
int main()
{
char *str = "12345";
printf("%c %c %c\n", *str, *(str++), *(str++));
return 0;
}
6. What is the output of the following program?
#include <stdio.h>
int main()
{
int i;
for (i=9;i<13; i++)
printf("%d %0x ",i,i);
return 0;
}
7. What is the output of the following program?
#include <stdio.h>
int main()
{
func(1);
return 0;
}
func(int i)
{
static char *str[] = {"One", "Two", "Three", "Four"};
printf("%s\n",str[i++]);
return;
}
8. What is the output of the following 'C' program ?
#include <stdio.h>
int main()
{
unsigned char i = 0x80;
printf("\n%d", i << 1);
}
9. State machine for Video player:
What will be state after following actions:
a) Insert -> Play -> FFwd -> Play -> FFwd -> Rev -> Stop ->Play
b) Insert -> Play -> FFwd -> FFwd -> FFwd -> Eject
10. Read requirement below and describe what strategy of testing would be taken:
Requirement 2 Washer Fluid Level Detection
Purpose: Detect if the washer fluid volume is low or not low by reading
the signal from the washer fluid level sensor. There shall be a
hysteresis on the level detection. Higher hysteresis when car is
moving.
Ver. Meth: Test
Req:
The CEM shall detect the washer fluid level according to below:
The timings are taken from the table Local Configuration (below)
(a) Low fluid level is detected when:
If CarMoving = True
Digital input from washer fluid level sensor is continuously True for more than
TWASHFLUIDCARMOVING ms.
If CarMoving = False
Digital input from washer fluid level sensor is continuously True for more than
TWASHFLUIDCARNOTMOVING ms.
(b) High fluid level is detected when:
If CarMoving = True
Digital input from washer fluid level sensor is continuously False for more than
TWASHFLUIDCARMOVING ms.
If CarMoving = False
Digital input from washer fluid level sensor is continuously False for more than
TWASHFLUIDCARNOTMOVING ms.
(c) Default value shall be High fluid level. To be set when CEM is powered up, after
reset and when CEM wakes up from sleep.
(d) Digital input from washer fluid level sensor shall be considered True if the input is
LOW (grounded, closed switch) or HIGH input (open switch)
Here "continuously" means that for a time T (table below), all samples have the same value.
Local Parameter Range Resolution Unit Value Description
TWASHFLUIDCARMOVING 0 - 30000 40 ms 10,000 Detection criteria for low fluid level when car is
moving
TWASHFLUIDCARNOTMOVING 0 - 5000 40 ms 200 Detection criteria for low fluid level when car is
not moving
11. Please look on the picture and describe verbally the content: