Professional Documents
Culture Documents
5 :
6. : 2
5 :
1.
RAM (Random Access Memory)
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 1
6 :
1. 1 MB
1. 1 : 1024 Byte
2. 2 : 1000000 Byte
3. 3 : 1048576 Byte
4. 4 : 1024000 Byte
5. : 3
7 :
1. 1 GB
4^2 KB 4 2 KiloByte
^
1. 1 : 10^3 KB
2. 2 : 1024 KB
3. 3 : 2^10 KB
4. 4 : 2^20 KB
5. : 4
8 :
1.
1. 1 : Voltage 2
2. 2 : 2 -
3. 3 : 2
4. 4 :
5. : 2
9 :
1.
1. 1 : Random-access memory
2. 2 : Read-only memory
3. 3 : Harddisk
4. 4 : Basic input/output system (BIOS)
5. : 3
10 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
11 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
12 :
1.
double d = 9.9;
int i = 2;
i = (int)d;
1. 1 : d
2. 2 : d
3. 3 : i
4. 4 : i d
5. : 3
13 :
1.
x
1. 1 : x +=3;
2. 2 : y=x+3;
3. 3 : x *=1;
4. 4 : x /=1;
5. : 1
14 :
1. Compiler
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
15 :
1.
1. 1 :
2. 2 :
3. 3 : 01101011
4. 4 :
5. : 4
16 :
1. 2
1. 1 : (Transistors)
2. 2 : (Vacuum tubes)
3. 3 : (Microprocessors)
4. 4 : (Integrated circuits)
5. : 1
17 :
1. (pipelining)
1. 1 : (Array processing)
2. 2 : (Parallel processing)
3. 3 : Von Neumann
4. 4 : (Multiprocessing)
5. : 3
18 :
1. Compiler Interpreter
1. 1 : Compiler Interpreter
2. 2 : Compiler Interpreter
3. 3 : Compiler
Interpreter
4. 4 : Debug Compiler Interpreter
5. : 3
19 :
1.
1. 1 : Executable File
2. 2 : Source File
3. 3 : Object File
4. 4 : Library File
5. : 1
20 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
21 :
1.
1. 1 : COBAL
2. 2 : C
3. 3 : C++
4. 4 : ASSEMBLY
5. : 4
22 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
23 :
1.
1. 1 : Translator
2. 2 : Result
3. 3 : Interpreter
4. 4 : Complier
5. : 3
24 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
25 :
1.
1. 1 : RAM
2. 2 : ROM
3. 3 : Harddisk
4. 4 : CompactFlash
5. : 2
26 :
1. CPU
1. 1 : Cache memory
2. 2 : ALU (Arithmetic Logic Unit)
3. 3 : Harddisk
4. 4 : Program Counter Register (PC)
5. : 3
27 :
(Operating Systems)
1.
1. 1 : Unix
2. 2 : Linux
3. 3 : Windows XP
4. 4 : Symbian
5. : 4
28 :
1. pseudocode:
a=0;
for i=1 to 10
a=a+3;
end
show_the_value_of(a);
1. 1:0
2. 2:1
3. 3 : 27
4. 4 : 30
5. : 4
29 :
1. pseudocode: a=receive_input_from_user();
if a>5 and a<10 then
if a=8 then
a=a+9;
else
a=a+10;
end
else
if a=0 then
a=a-10;
end
end
run pseudocode 3 input user 10, 3, 7 a
:
1. 1 : 0 0 70
2. 2 : 18 -7 0
3. 3 : 9 10 -3
4. 4 : 10 3 17
5. : 4
30 :
1. Random Access Memory (RAM)
1. 1 : 40 Gbyte
2. 2 :
3. 3 :
4. 4 :
5. : 4
31 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
32 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
33 :
1. operating systems
1. 1 : Windows 2000
2. 2 : Windows Office
3. 3 : Windows XP
4. 4 : Linux
5. : 2
34 :
1.
1. 1 : Intel
2. 2 : JAVA
3. 3 : Basic
4. 4:C
5. : 1
35 :
1. standard output
1. 1 : printer
2. 2 : monitor
3. 3 : diskette
4. 4 : Key board
5. : 2
36 :
1. standard input
1. 1 : printer
2. 2 : monitor
3. 3 : diskette
4. 4 : Keyboard
5. : 4
37 :
1.
1. 1 : start/end
2. 2 :
3. 3 :
4. 4 :
5. : 3
38 :
1. input
1. 1 : Keyboard
2. 2 : Mouse
3. 3 : Monitor
4. 4 : Scanner
5. : 3
39 :
1. 16 123
1. 1 : RAM
2. 2 : ROM
3. 3 : PROM
4. 4 : Flash Memory
5. : 4
41 :
1. 32
1. 1 : 32
2. 2 : (data bus) 32
3. 3 : (address bus) 32
4. 4 :
(register) 32
5. : 4
42 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
43 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5:
6. : 2
44 :
1. MO (Magneto-Optical) disk
1. 1 :
2. 2 :
3. 3 :
4. 4 : . .
5. : 4
45 :
1. Unicode
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
46 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
47 :
1.
1. 1 : RAM
2. 2 : CD-ROM
3. 3 : Floppy Disk
4. 4 : Hard Disk
5. : 1
48 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
49 :
1.
1. 1 : (Byte)
2. 2 : (Bit)
3. 3 : (Sector)
4. 4 : (Track)
5. : 3
50 :
1.
51 :
1.
1. 1 : Multitasking
2. 2 : Object Linking
3. 3 : Object Embedding
4. 4 : Multi User
5. : 1
52 :
1. Hierarchical File System
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
53 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
54 :
1.
1. 1 : Dot Pitch
2. 2 : PPM
3. 3 : DPI
4. 4 : bps
5. : 3
55 :
1. (Port)PnP(Plug and Play)
1. 1 : COM1
2. 2 : COM2
3. 3 : USB
4. 4 : ISA
5. : 3
56 :
1.
1. 1 : MIPS
2. 2 : MFLOPS
3. 3 : VUP
4. 4 : IPS
5. : 4
57 :
1.
?
1. 1 : Bit
2. 2 : Byte
3. 3 : Field
4. 4 : Record
5. : 1
58 :
1.
1. 1 : EBCDIC
2. 2 : ASCII
3. 3 : BCD
4. 4 : UCB
5. : 2
59 :
1.
1. 1 : Floppy Disk
2. 2 : Hard Disk
3. 3 : CDROM
4. 4 : Tape
5. : 4
60 :
1.
1. 1 : MAN
2. 2 : LAN
3. 3 : WAN
4. 4 :
5. : 3
61 :
1. (Algorithm)
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
62 :
1.
1. 1 : CPU + RAM
2. 2 : CPU + Harddisk
3. 3 : RAM + Harddisk
4. 4 : OS + RAM
5. : 1
63 :
1.
Input Output
1. 1 : Keyboard, Scanner
2. 2 : Printer, Floppy Disk
3. 3 : Harddisk, Touch Screen
4. 4 : Touch Pad, Monitor
5. : 4
64 :
1. OS (
)
1. 1 : Opera
2. 2 : Linux
3. 3 : DOS
4. 4 : Unix
5. : 1
65 :
1.
1. 1 : Mini Computer
2. 2 : Super Computer
3. 3 : Micro Computer
4. 4 : Analog Computer
5. : 3
66 :
1. Hard Disk
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
67 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
68 :
1. Pseudo code flow chart
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
70 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
71 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
72 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
73 :
1.
(Integrated Circuit)
1. 1 :
2. 2 : 2
3. 3 : 3
4. 4 :
5. : 3
74 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
75 :
1.
1. 1 : Power Supply
2. 2 : Monitor
3. 3 : UPS
4. 4 : Case
5. : 3
76 :
1.
1. 1 : SDRAM
2. 2 : Hard Disk
3. 3 : CD-ROM Disk
4. 4 : Floppy Disk
5. : 2
77 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
78 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
79 :
1. 1 + 4 / 2
1. 1 : 2.5
2. 2:3
3. 3:2
4. 4 : 3.5
5. : 2
80 :
1. 2 + 3 * 4 - 1
1. 1 : 11
2. 2 : 13
3. 3 : 15
4. 4 : 19
5. : 2
81 :
1.
s = 0.5 * g * t^2
1. 1:1
2. 2:2
3. 3:3
4. 4:4
5. : 3
82 :
1. 8
( )
1. 1 : Integer 2 , Real 1 , 1
2. 2 : Integer 1 , Real 2 , 1
3. 3 : Integer 2 , Real 2 , 2
4. 4 : Integer 1 , Real 1 , 2
5. : 1
83 :
1. Assignment Statement
1. 1 :
2. 2 : expression
3. 3 : Array
4. 4 :
5. : 1
84 :
1. Tool
1. 1 : WinRAR
2. 2 : Oracle
3. 3 : Apache
4. 4 : WinAmp
5. : 1
85 :
1.
Tool
1. 1 : Norton SystemWork
2. 2 : McAfee Internet Security
3. 3 : MS Office Tools
4. 4 : Adobe Acrobat
5. : 1
86 :
1.
1. 1 : IEEE 802.3
2. 2 : IEEE 802.4
3. 3 : IEEE 802.5
4. 4 : IEEE 802.6
5. : 1
87 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
88 :
1. 1024 Byte
1. 1 : Megabyte
2. 2 : Kilobyte
3. 3 : Gigabyte
4. 4 : Terabyte
5. : 2
89 :
1.
1. 1 : Bit
2. 2 : Byte
3. 3 : Word
4. 4 : Character
5. : 1
90 :
1.
1. 1 : Fortran Language
2. 2 : NGV Language
3. 3 : Cobol Language
4. 4 : Assembly Language
5. : 4
91 :
1.
1. 1 : , , ,
2. 2 : , , ,
3. 3 : , , ,
4. 4 : , , ,
5. : 3
92 :
1.
1. 1 : Voice Computer
2. 2 : Voice Technology
3. 3 : Special Computer
4. 4 : Voice Recognition
5. : 4
93 :
1.
1. 1 : BASIC , POWERPOINT
2. 2 : BASIC , COBOL
3. 3 : COBOL , EXCEL
4. 4 : COBOL , POWERPOINT
5. : 2
94 :
1.
1. 1 : FTP
2. 2 : IBM
3. 3 : PPP
4. 4 : GPD
5. : 1
: 2 :
95 :
1. 7.82
1. 1 : integer
2. 2 : char
3. 3 : float
4. 4 : bit
5. : 3
96 :
1. int * float
1. 1 : char
2. 2 : int
3. 3 : float
4. 4 : double
5. 5 :
6. : 3
97 :
1. 3.54 int
1. 1 : 3.54
2. 2 : 3.5
3. 3 : 3
4. 4 : 0
5. : 3
98 :
1.
1. 1 : 4 bits = 1 byte
2. 2 : 8 bits = 1 byte
3. 3 : 1000 bytes = 1 kilobyte (KB)
4. 4 : 1000 KB = 1 megabyte (MB)
5. : 2
99 :
1. 16.07
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
100 :
1
1.
1. 1 : 7
2. 2 : 8
3. 3 : 9
4. 4 : 16
5. : 2
101 :
1. x, y, z
int x = 8;
double y = 3;
int z = 2;
x++;
y = y / z;
z = (int)y;
x - 1;
102 :
1 32767 n ?
1.
1. 1 : int n;
2. 2 : signed int n;
3. 3 : unsigned int n;
4. 4 : unsigned char n;
5. : 3
103 :
1. ?
104 :
1. char ch = A; printf ? ( ASCII A = 65)
105 :
1. char str[ ] = I love \ABC\.;
str ?
1. 1 : 12 bytes
2. 2 : 13 bytes
3. 3 : 14 bytes
4. 4 : 15 bytes
5. : 3
106 :
1.
1. 1 : report_99
2. 2 : food
3. 3 : general
4. 4 : 7sumurai
5. : 4
107 :
1. x -123456
x
1. 1 : unsigned long
2. 2 : int
3. 3 : unsigned int
4. 4 : long
5. : 4
108 :
1.
12345
1. 1 : double
2. 2 : int
3. 3 : long
4. 4 : float
5. : 2
109 :
1. (Local Variable) (Global Variable)
110 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
111 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
112 :
1. Sign-Magnitude Magnitude
n
1. 1 : n-1
2. 2 : n-2
3. 3 : n
4. 4 : n+1
5. : 1
113 :
1. int
1. 1 :
2. 2 :
3. 3 :
4. 4 : 16
5. : 3
114 :
1. float
1. 1 : 16
2. 2 :
3. 3 :
4. 4 :
5. : 4
115 :
1. 4286
1. 1 : 01100010001110
2. 2 : 01100101001110
3. 3 : 01000110110110
4. 4 : 01000010111110
5. : 4
116 :
1. C,C++ 16
1. 1 : 120X
2. 2 : 0X14
3. 3 : 013
4. 4 : 31H
5. : 2
117 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 4
118 :
1. c,c++ 8 16
1. 1 : float
2. 2 : double
3. 3 : int
4. 4 : long double
5. : 3
119 :
1.
1. 1 : char
2. 2 : int
3. 3 : float
4. 4 : double
5. : 1
120 :
4 bytes
1.
1. 1 : char
2. 2 : ussigned char
3. 3 : int
4. 4 : float
5. : 4
121 :
1.
1. 1 : @@AA
2. 2 : #aa
3. 3 : !aa
4. 4 : aa_
5. : 4
122 :
1.
123 :
1. C
1. 1 : %c
2. 2 : %e
3. 3 : %f
4. 4 : %u
5. : 4
124 :
1. C,C++
1. 1 : \n
2. 2 : \t
3. 3 : \v
4. 4 : \r
5. : 3
125 :
1. x Real
y Integer
compile run
1. 1:x+y
2. 2 : x mod y
3. 3:x*y
4. 4:x/y
5. : 2
126 :
1. X int
1. 1 : x = 3000000000
2. 2 : X = 35.01
3. 3 : x = 300 + 20*3
4. 4 : x = 3.1416 * 2
5. : 3
127 :
1.
1. 1 : integer
2. 2 : character
3. 3 : string
4. 4 : float
5. : 4
128 :
1.
1. 1 : char
2. 2 : string
3. 3 : real
4. 4 : integer
5. : 1
129 :
1.
a=5
b=3
c=true
d=(a>b) xor c
d
1. 1 : a>b
2. 2 : a<>b
3. 3 : not c
4. 4 : 1 2
5. : 3
130 :
1. program Q3 C ( 0C 100C) F
6
program Q3
1 Program Q3;
2 uses wincrt;
3 var i:integer;
4 c, f: real;
5
6 Procedure CalF(....................., b: real);
7 begin
8 a:= (b*9/5)+32;
9 end;
10Begin
11 writeln('C to F');
12 for i:= 0 to 100 do
13 begin
14 c:= .............;
15 ........................;
16 writeln(C:5:1, F:8:1);
17 end;
18end.
1. 1 : a: integer
2. 2 : a: real
3. 3 : var a: integer
4. 4 : var a:real
5. : 4
131 :
1. x,y z c (expression)
1. 1 : x+y/z
2. 2 : -z
3. 3 : x*x*y
4. 4 : z+c
5. : 4
132 :
1.
1. 1 :
2. 2 : (record structure)
3. 3 : 2
4. 4 : (pointer)
5. : 3
133 :
1. char a,b,c; b 100 c 100 a=b*c;
1. 1 : a 10000
2. 2 : a -10000
3. 3 : a 255 char
4. 4 : a
5. : 4
134 :
1.
1. 1 : Real
2. 2 : Integer
3. 3 : Alphabet
4. 4 : Boolean
5. : 1
135 :
1. Date
1. 1 : Real
2. 2 : Integer
3. 3 : Boolean
4. 4 :
5. : 2
136 :
1.
1. 1 : printf();
2. 2 : chart();
3. 3 : clrscr();
4. 4 : getchar();
5. : 4
137 :
1.
1. 1 : %c
2. 2 : %f
3. 3 : %d
4. 4 : %s
5. : 3
138 :
1. Float
1. 1 : 0123
2. 2 : 0x174
3. 3 : 55.5555
4. 4 : -2345
5. : 3
139 :
1.
1. 1 : scanf()
2. 2 : printf()
3. 3 : getinfo()
4. 4 : putchar()
5. : 1
140 :
1.
1. 1 :
2. 2 : #
3. 3 : 64
4. 4 :
5. : 4
141 :
1. 0x
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
142 :
1.
1. 1 : com-puter
2. 2 : 8number
3. 3 : right#
4. 4 : class_room
5. : 4
143 :
1.
1. 1 : 007bond
2. 2 : james_bond
3. 3 : jason born
4. 4 : jamesbond%
5. : 2
144 :
1.
1. 1 : printf()
2. 2 : scanf()
3. 3 : getchar()
4. 4 : putchar()
5. : 4
145 :
1.
1. 1 : printf()
2. 2 : scanf()
3. 3 : gets()
4. 4 : fopen()
5. : 1
146 :
1.
1. 1 : printf()
2. 2 : fgetpos()
3. 3 : switch()
4. 4 : gets()
5. : 4
: 3 :
147 :
1.
148 :
1.
a = 100 ; b = 200 ; c = 50 ; d = 2 ;
a/c/d*b + b /(a+c) + a/d*c*b/1000 ;
1. 1 : 701
2. 2 : 700
3. 3 : 501
4. 4 : 702
5. : 1
149 :
1.
x,a, b
x = 0; a = -2; b = 5;
x = x + a; a = a + b; b = b - 6;
x = b + a; a = a + 1; b = b + 1;
x = b + a; a = a + 1; b = b + 1;
x = b + a; a = a + 1; b = b + 1;
1. 1 : x=0, a = -2, b = 5
2. 2 : x = 4, a = 6, b = 2
3. 3 : x = 6, a =6, b = 2
4. 4 : x = 6, a = 5, b = 1
5. : 3
150 :
1. a b
a = 5, b = 2 a / b
1. 1:2
2. 2 : 2.5
3. 3:1
4. 4 : 0.5
5. : 1
151 :
1. a b % modulus operator
a = 5, b = 2 a % b
1. 1:2
2. 2 : 2.5
3. 3:1
4. 4 : 0.5
5. : 3
152 :
1. (a+b/c-d)*e
1. 1 : ((a+b)/c-d)*e
2. 2 : (a+b)/c-d*e
3. 3 : a+b/c*e-d*e
4. 4 : (a*e+b*e/c-d*e)
5. : 4
153 :
1. -(-15+(2*4-2))+((6+3)*5+7)/4
1. 1 : 23
2. 2 : 22
3. 3 : 21
4. 4 : 20
5. : 2
154 :
1.
1. 1 : (a AND b) a b
2. 2 : (NOT a) a
3. 3 : (a OR b) a b
4. 4 : NOT (a AND b) a b
5. : 4
155 :
1. X=1, Y=10, Z=100
1. 1 : NOT (Z/Y == Y)
2. 2 : NOT(Y*X == Y)
3. 3 : Z <= (Y*Y 1)
4. 4 : X*Z => Z/X
5. : 4
156 :
1. A=1, B=2, C=3, D=4
1. 1 : (A*B+C > C-B) && (A*D/B <= B)
2. 2 : (A+B*C < B-C) || ((C+D)*A == A+B*C)
3. 3 : (B/A <= D/C) || ((A+C) == (D*A)) && (C/B < A/D)
4. 4 : (A < B) && (C < D) && (A > B) || (D==2*B)
5. : 3
157 :
1. wet, cold, windy
wet=true , cold=false, windy=false
(cold AND (NOT wet)) OR NOT(windy OR cold)
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
158 :
1.
1. % modulus operator
2. & bitwise AND operator
3. 1
4. 0
5.
1. 1 : (3<2) + 5 6
2. 2 : (8 % 3) - 1 0
3. 3 : (3 = 3) + (6 <> 9) * 3 6
4. 4 : (23 2) & 1 1
5. : 4
159 :
1. y % modulus operator
y y = 1 5 / 3 + 9 % 4;
1. 1:0
2. 2:1
3. 3 : -1
4. 4:2
5. : 2
160 :
1. answer (% modulus operator)
int a = 1, b = 2, c = 3:
double f = 1.75, g = 1.0, h = 5
double answer;
answer = a + g b * f c % b h * 2;
1. 1 : -11.6
2. 2 : -12.5
3. 3 : -13.1
4. 4 : 12.0
5. : 2
161 :
1.
1. fmod(x,y) x/y
2. floor(x) x
x ( x )
x = 19.75;
x = fmod(x, floor(x));
1. 1 : 1.00
2. 2 : 19.75
3. 3 : 0.75
4. 4 : 1.75
5. : 3
162 :
1.
x1 x2 ?
x2 = 1;
x4 = 5;
x2 = (x4 + x2 % 2 - 3);
x4 = x2;
x3 = x4;
x1 = x3;
1. 1 : x1 = 5, x2 = 5
2. 2 : x1 = 3, x2 = 1
3. 3 : x1 = 1, x2 = 5
4. 4 : x1 = 3, x2 = 3
5. : 4
163 :
1.
ans
x2 = 1;
x4 = 5;
x2 = (x4 + x2 % 2 - 3);
x4 = x2;
x3 = x4;
x1 = x3;
ans = x4 + x3 + x3 + x2 + x1;
1. 1 : 18
2. 2 : 17
3. 3 : 16
4. 4 : 15
5. : 4
164 :
1.
int x, y = 7, z = 5;
x = ((++y) + (z--)) % 10;
x ?
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. : 4
165 :
1. if(raining)
if(window_open)
puts("Close the window");
166 :
Y
1. sqrt(Y) M = -3 N = 5 X =
-3.57 Y = 4.78
1. sqrt(Y) < N
2. (X > 0) OR (Y > 0)
3. (NOT((M > N) AND (X < Y))) OR ((M <= N) AND (X > X))
1. 1 : 1. 2. 3.
2. 2 : 1. 2. 3.
3. 3 : 1. 2. 3.
4. 4 : 1. 2. 3.
5. : 2
167 :
1.
count = 16, num = 4;
value = 31.0, many = 2.0;
value = (value - count)*(count - num)/many + num/many;
value
1. 1 : 91
2. 2 : 92
3. 3 : 101
4. 4 : 102
5. : 2
168 :
1. Value = 50; bit-wise XOR (exclusive or) Value
Value
1. 1 : Value 0
2. 2 : Value 1
3. 3 : Value 50
4. 4 :
5. : 1
169 :
1. Bitwise Operator Logical Operator
22 % x 4;
1. 1:2
2. 2:4
3. 3:6
4. 4:8
5. : 3
171 :
1.
1. 1 : P and P
2. 2 : P or P
3. 3 : not(P) and P
4. 4 : not(P) or P
5. : 4
172 :
1. f
1 f(n) = f(n-1)+f(n-2) n , n 2
2 f(1) = 1 f(0) = 1
f(7)
1. 1:0
2. 2 : 11
3. 3 : 21
4. 4 : 31
5. 5 :
6. : 3
173 :
g
1.
g(0) = 1
g(n) = 2g(n-1) n > 0
g(n)
1. 1 : g(n) = 2n
2. 2 : g(n) = n*n
3. 3 : g(n) = 2 n
4. 4 : g(n) = 2 (n+1)
5. : 3
174 :
1. ++
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 1
175 :
1. 3+4*6/2+1
1. 1:9
2. 2 : 11
3. 3 : 14
4. 4 : 16
5. : 4
176 :
1. q=10,r=5,s=10
1. 1 : (s/r) <= q
2. 2 : (s*r) <=q
3. 3 : (q-r) == (s-q+r)
4. 4 : (q) < (r-s)
5. : 3
177 :
1.
NOT( A OR B OR C)
178 :
1.
1.
2.
3.
3.
A B C D
179 :
1. (1 + 2 * 3 - 4)
1. 1 : -3
2. 2:1
3. 3:3
4. 4:5
5. : 3
180 :
1. a b % modulus operator
a b
a % b 1
b % a 2
1. 1 : a = 5 b = 4
2. 2 : a = 4 b = 5
3. 3 : a = 3 b = 2
4. 4 : a = 2 b = 3
5. : 3
181 :
1. 3 + 5 * 5 -1
1. 1 : 23
2. 2 : 27
3. 3 : 49
4. 4 : 625
5. : 2
182 :
1. wet, cold, windy
wet=true, cold=false, windy=false
&& and , || or, ! not
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
183 :
1.
1. 1 : (x > 0) x 0
2. 2 : (x >= 0) x 0
3. 3 : (x <= 0) x
4. 4 : (x < 0) x
5. : 3
184 :
1. % modulus operator
(203 % 10 % 9 % 7 % 5)
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. : 4
185 :
1. % modulus operator
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. : 1
186 :
1. a,b,c
a=10,b=20,c=30
a + b * c / a + 10
1. 1 : 70
2. 2 : 80
3. 3 : 100
4. 4 : 120
5. : 2
187 :
1. && AND, || OR
operator
1. 1 : + (y + 80)
2. 2 : > (x > y + 80)
3. 3 : &&
4. 4 : ||
5. : 1
188 :
1. x = 1 + 2 + 3 + 4 + 5;
x = x + x;
x = x + x;
x = x + x;
1. 1 : 120
2. 2 : 100
3. 3 : 80
4. 4 : 60
5. : 1
189 :
1.
1. ~ one-complement ( bit-wise not)
2. & bit-wise and
3. ! logical not
4. logical operation 1 () 0 ()
5
~!(b & 1) b
1. 1:5
2. 2:1
3. 3:0
4. 4:4
5. : 4
190 :
1. 8 4
4
x
1. 1 : x>>4
2. 2 : x/16
3. 3 : x-64
4. 4 : x%64
5. 5 :
6. : 2
191 :
1.
X1 = 1, X2 = 2, X3 = 3, X4 = 4
X1 / X2 * X3 / X4
1. 1 : 0.417
2. 2 : 0.375
3. 3 : 0.667
4. 4 : 0.867
5. : 2
192 :
1. / operator
23
1. 1:3+4*5
2. 2 : 200 / 5 / 2 + 10 / 3
3. 3 : 1 + 77 / 7 * 2
4. 4 : 23 / 3 * 3
5. : 4
193 :
1.
194 :
1. m
m
195 :
1. n % modulus operator
n ( n = 12345
23)
1. 1 : (n / 1000) % 100
2. 2 : (n % 1000) / 100
3. 3 : (n % 10000) / 100
4. 4 : (n % 10000) / 1000
5. : 3
196 :
1. C
C F
: 0 32 100 212
1. 1 : F = C * 180/100 + 32
2. 2 : F = 32 + 1.8 * C
3. 3 : F = 1.8C + 32
4. 4 : F = 9 * C / 5 + 32
5. : 3
197 :
1. % modulus operator
((201 % (11 % 8)) % (9 % 5))
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. : 1
198 :
1. m
1 <= m <= 12
199 :
1. n
n
1. 1 : (n == 1) || (n == 3) || (n == 5) || (n == 7) || (n == 9)
2. 2 : (n / 10 == 1)
3. 3 : (n / 2 == 1)
4. 4 : (n % 2 == 1)
5. : 4
200 :
1. n
n 13 22
201 :
1. n 5
10600 10300
(
)
77000 77130
77
1. 1 : (n % 77 == 0)
2. 2 : (n % 100 == 77)
3. 3 : (n / 1000 == 77)
4. 4 : (n / 77 == 0)
5. : 3
202 :
1. random()
[0, 1) 0 1 ( 1)
[a, b] a b (a b a < b)
x )
( floor(x)
1. 1 : floor(random() * (b - a + 1))
2. 2 : floor(a + random() * b)
3. 3 : a + floor((b - a) * random())
4. 4 : a + floor((b - a + 1) * random())
5. : 4
203 :
1. a
a
a 0 99 b
( a 21 b 12 )
1. 1 : b = a / 10 + (a % 10)
2. 2 : b = (a % 10) * 100 + (a % 10)
3. 3 : b = 10 * (a % 1) + (a % 10)
4. 4 : b = 10 * (a % 10) + (a / 10)
5. : 4
204 :
1.
a = 2, b = 4, c = 8, d = 16;
a + (c + d) / a * b + d / a
1. 1 : 58
2. 2 : 60
3. 3 : 13
4. 4 : 122
5. : 1
205 :
1.
a = 2, b = 4, c = 8, d = 16
b * a + d / b / a + b * c
1. 1 : 24
2. 2 : 35
3. 3 : 42
4. 4 :
5. : 3
206 :
1. a , && AND, || OR
207 :
1. a , && AND, || OR
208 :
1.
(x1, y1) (x2, y2)
slope
1. 1 : y1 - y2 / x1 - x2
2. 2 : y2 - y1 / x2 - x1
3. 3 : (y1 - y2) / x1 - x2
4. 4 : (y1 - y2) / (x1 - x2)
5. : 4
209 :
1. (x1, y1) (x2, y2)
d
sqrt(d)
1. 1 : sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
2. 2 : sqrt((x1-x2)*(x2-x1)+(y1-y2)*(y2-y1))
3. 3 : sqrt((x2-x1)*(x1-x2)+(y2-y1)*(y1-y2))
4. 4 : sqrt((y1-y2)*(y2-y1)+(x1-x2)*(x2-x1))
5. : 1
210 :
1. n
n
1. 1 : (n == 0) || (n == 2) || (n == 4) || (n == 6) || (n == 8)
2. 2 : (n / 10 == 0)
3. 3 : (n % 2 == 0)
4. 4 : (n / 2 == 0)
5. : 3
211 :
1. n
n
212 :
1. n
n
1. 1 : (2*n/2 == n)
2. 2 : (n/2*2 == n)
3. 3 : (n/10*10 == n)
4. 4 : (10*n/10 == n)
5. : 2
213 :
1. n
n
1. 1 : (n/2*2 == n+1)
2. 2 : ((n+1)/2*2 == n)
3. 3 : ((n-1)/2*2 == n)
4. 4 : (n/2*2 == n - 1)
5. : 4
214 :
1.
1. .. ..
2. . 1.2 11
3. 2 (
floor) 7
4. 7 0 1 , ..., 6
2543
y .. 4
215 :
1. random() [0, 1) 0 1 ( 1)
0 50 ( floor(x)
x )
1. 1 : floor( 50*random() )
2. 2 : floor( 50*random() ) % 50
3. 3 : floor( 51*random() ) % 100
4. 4 :
5. : 3
216 :
1. random() [0, 1) 0 1 ( 1)
[-10, 10] -10 10
x )
( floor(x)
217 :
1. a = 5, b = 3 , c = 2 , d = 0.5 s = a*b+c; s =
1. 1 : 15
2. 2 : 16
3. 3 : 17
4. 4 : 18
5. : 3
218 :
1. a = 5, b = 3 , c = 2 , d = 0.5 t = b+c*b; t =
1. 1:8
2. 2:9
3. 3 : 10
4. 4 : 12
5. : 2
219 :
1. a = 5, b = 3 , c = 2 , d = 0.5 v = a*a+b*b+c*c; v =
1. 1 : 36
2. 2 : 28
3. 3 : 38
4. 4 : 48
5. : 3
220 :
1. a = 5, b = 3 , c = 2 , d = 0.5 x = a%5; x =
1. 1:0
2. 2:2
3. 3:4
4. 4:6
5. : 1
221 :
1. a = 5, b = 3 , c = 2 , d = 0.5 y = a/c; y =
1. 1 : 1.5
2. 2:2
3. 3 : 2.5
4. 4:3
5. : 3
222 :
1. a = 5, b = 3 , c = 2 , d = 0.5 z = a/d; z =
1. 1:0
2. 2 : 10
3. 3 : 11
4. 4 : 12
5. : 2
223 :
1. && i = 2 j = 5 (i>3) && (j>4)
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
224 :
1. value1 , value2
n = 20;
value1 = n++;
value2 = ++n;
printf(%d , %d ,value1,value2);
1. 1 : 20 , 21
2. 2 : 21 , 20
3. 3 : 21 , 21
4. 4 : 20 , 22
5. : 4
: 4 :
225 :
1. x = 5; y = 7; z = 12;
k = (x + y) * z + y;
k
1. 1 : 74
2. 2 : 128
3. 3 : 151
4. 4 : 96
5. 5 : 47
6. : 3
226 :
1. z x y
1. 1 : z = x2 + y2;
2. 2 : z = x * x + y * y;
3. 3 : z = x * 2 + y * 2;
4. 4 : z = x ** 2 + y ** 2;
5. 5 : z = xx + yy;
6. : 2
227 :
1. Relative Precedence Operators 1) ++ -- 2) * / % 3) + - Operator
Precedence j x = 4 + 5 * 3;
1. 1 : x= 27
2. 2 : x = 19
3. 3 : x= 17
4. 4 :
5. 5 :
6. : 2
228 :
1.
i=0
i=i+1
j=1
j=i+j
1. 1 : i 0
2. 2 : j 0
3. 3 : j 1
4. 4 : j 2
5. 5 : j 3
6. : 4
229 :
1.
x y
x + y a
x y b
a b
8 2
1. 1:8
2. 2 : 16
3. 3 : 28
4. 4 : 60
5. 5 : 66
6. : 4
230 :
1.
x, y z
x, y, z a
x, y, z c
x, y, z b
1. 1:a<b<c
2. 2:a>b>c
3. 3 : a <= b <= c
4. 4 : a >= b >= c
5. 5 : a >= b <= c
6. : 4
231 :
int a = 50; PRINTtoSCREEN(a+200);
1.
232 :
1. x, y z 18, 12 4 x = x y;
y = y x; z = x * y / z;
1. 1 : x = 9;
2. 2 : y = 12;
3. 3 : z = 18;
4. 4 : x = 2/3 z;
5. 5 : y = 1/3 z;
6. : 4
233 :
1. x, y z 100, 13 91
1: z = z / y;
2: y = y + z;
3: x = x * z / y;
1. 1 : x 25
2. 2 : z 8
3. 3 : y 21
4. 4 : x 12 3 (x+z)/y
5. 5 : x 25 z = z-2; 3
6. : 5
234 :
1. X
X=3
Y=X+1
X=Y+2
END
1. 1:6
2. 2:5
3. 3:7
4. 4:4
5. 5:3
6. : 1
235 :
1. X
X=X+2
X=0
X=X+1
END
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. 5:4
6. : 2
236 :
1. X
Y = 11
X=Y
Y=Y+3
END
1. 1:0
2. 2:3
3. 3 : 11
4. 4 : 14
5. : 3
237 :
1. C Newcount Count
--------------------------------------------------
1. 1 : 2,4
2. 2 : 2,5
3. 3 : 3,4
4. 4 : 3,5
5. : 1
238 :
1. C Newcount Count
------------------------------------------
int Newcount=0, Count=1;
Newcount = Count++;
Count = 3+Newcount++;
Newcount = ++Count;
1. 1 : 4,5
2. 2 : 4,6
3. 3 : 5,5
4. 4 : 5,6
5. : 3
239 :
1. x = 10
y=5
x=y
y=x
1. 1 : x 5
2. 2 : x - y 5
3. 3 : y
4. 4 :
5. : 2
240 :
1. b = 10 c = 5 2 a
1 b = b + c ;
2 a = b - 5 ;
1. 1:5
2. 2 : 20
3. 3 : 25
4. 4 : 15
5. 5 : 10
6. : 5
241 :
1. b = 5 c = 8 3 a
1 b = b * 2;
2 c = c + b ;
3 a = b * c;
1. 1 : 40
2. 2 : 65
3. 3 : 80
4. 4 : 180
5. : 4
242 :
1. b = 10 c = 5 4 c
1 b = b + c;
2 a = b - 5;
3 b = a -c;
4 c = b + a;
1. 1 : -10
2. 2:5
3. 3 : 10
4. 4 : 15
5. : 4
243 :
1. x y
1. 1 : x=y; y=x;
2. 2 : x=x+y; y=x-y; x=y-x;
3. 3 : x=x-y; y=y+x; x=x+y;
4. 4 : x=x+y; y=x-y; x=x-y;
5. : 4
244 :
1.
1. 1 : 12
2. 2 : 13
3. 3 : 15
4. 4 : 18
5. 5 : 20
6. : 4
245 :
1.
246 :
1.
1. 1 : 04 05
2. 2 : 05 06
3. 3 : 06 07
4. 4 : 07 08
5. : 3
247 :
1.
do
while
1. 1 : for
2. 2 : if-else
3. 3 : while
4. 4 : do-while
5. : 4
248 :
1.
1. 1 : \m
2. 2 : \n
3. 3 : \o
4. 4 : \p
5. : 2
249 :
1. main() { int a,b,c,d; printf(Enter three number ); scanf(%d%d%d,&a,&b,&c); d =c; if(a>d) d = a;
if(b > d) d = b; printf(value of D = %.2f,); }
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 3
250 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
251 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
252 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
: 5 :
253 :
1.
1
x , y integer
2 x =20 ; y =25 ;
3 x = x + 10 ; y =25 ;
4 x y = x + 20
x = x- 5 ;
5 x y
6
1. 1 : x= 30 ; y = 25:
2. 2 : x= 40 ; y = 25:
3. 3 : x= 50 ; y = 25:
4. 4 : x= 25 ; y = 25:
5. : 4
254 :
1.
1
x , y integer
2 x = 10 ; y =40 ;
3 x = x + 2 ; y = y - 5 ;
4 x = x + 2 ; y = y - 5 ;
5 x = x + 2 ; y = y - 5 ;
6 x,y
1. 1 : ( x = 16 ; y = 25 ;)
2. 2 : ( x = 14 ; y = 30 ;)
3. 3 : ( x = 12 ; y = 35 ;)
4. 4 : ( x = 10 ; y = 40 ;)
5. : 1
255 :
1. A = 20
1. 1 : B=0
2. 2 : B=10
3. 3 : B=20
4. 4 : B=30
5. 5 :
6. : 2
256 :
1. A = 5
1. 1 : B=0
2. 2 : B=10
3. 3 : B=20
4. 4 : B=30
5. 5 :
6. : 4
257 :
1. A = 8
1. 1 : B=0
2. 2 : B=10
3. 3 : B=20
4. 4 : B=30
5. 5 :
6. : 4
258 :
1. Flow chart RUN y =15+0.2x x
1. 1 : x 84 83 79 75
2. 2 : x 87 82 77 76
3. 3 : x 85 80 77 76
4. 4 : x 84 83 78 75
5. : 3
259 :
1. Flow chart y
1 x= 79 , 2 x= 15 ;
1. 1 : 30.8 , 32.5
2. 2 : 17.9, 32.5
3. 3 : 17.9, 30.8
4. 4 : 30.8, 17.9
5. : 1
260 :
1.
1. 1 : if....then....else
2. 2 : if .. then
3. 3 : for loop
4. 4 :
5. : 1
261 :
1.
1. 1 : if....then....else
2. 2 : while do ......
3. 3 : if.. then
4. 4 :
5. : 2
262 :
1.
1. 1 : if....then....else
2. 2 : while do ......
3. 3 : do.... while
4. 4 :
5. : 3
263 :
1. X a = 100
if (a >= 1000)
X = 1;
else if (a < 10)
X=2;
else if (a > 100)
X = 3;
else
X = 4;
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. 5:4
6. : 5
264 :
1. x
int x=50;
if (x > 50)
x=x+10;
else if (x < 30)
x=x+20;
else x=x+30;
x=x+10;
1. 1 : 90
2. 2 : 80
3. 3 : 70
4. 4 : 60
5. : 1
265 :
1. algorithm x,y,z ! not operator
-----------------------------------------------------------------------------
1: int x=6, y = 1, z = 2;
2: if (!x) {
3: x = y + 1;
4: z = x - y;
5: } else
6: y = x - z;
266 :
1. x 0, 4, 10, 1,3
index 0 4 ans
C ans = x[0];
for (i=1; i<=4; i++)
{
if (ans ans = x[i];
} pascal ans := x[0];
for i:=1 to 4 do
begin
if (ans ans := x[i];
end
1. 1:0
2. 2:4
3. 3 : 10
4. 4:1
5. 5:3
6. : 3
267 :
1. ans = 0 num
if( ((num*4-15) < num) || ((num*4-15)>num))
ans = 1;
else
ans = 0;
|| OR operator pascal
1. 1:1
2. 2:2
3. 3:3
4. 4:4
5. 5:5
6. : 5
268 :
1. a += (n1 >= n2) ? n1 : n2;
269 :
1. if (a <= b) c = a; else c = b; ?
1. 1 : c a
a b
2. 2 : c b a b
3. 3 : c b
4. 4 : c a a b
5. 5 : 1
6. : 3
270 :
1. if statement n
10 30
? ==
!=
|| OR
&& AND
/ div
% mod
271 :
1. n integer
n 3
( 3, 13, 23, 33, ...) if ?
% mod , / div , ==
1. 1 : if((n % 3) == 0)
2. 2 : if((n / 3) == 0)
3. 3 : if((n % 10) == 3)
4. 4 : if((n / 10) == 3)
5. 5 : 1
6. : 3
272 :
1. constant MAXNUM 20 integer number 30; if (number > MAXNUM) number =
MAXNUM; PRINT_TO_SCREEN(number); number
1. 1 : number = 0
2. 2 : number = 20
3. 3 : number = 30
4. 4 : number = 40
5. 5 :
6. : 2
273 :
1.
1. N= 5
2. N= 2
IF (N < 5) THEN
IF (N == 4) THEN PRINT "Hello."
ELSE IF (N == 3) THEN PRINT "Goodbye."
PRINT "Siam"
1. 1 : 1. Siam 2. Goodbye
2. 2 : 1. Hello 2. Goodbye
3. 3 : 1. Siam 2. Siam
4. 4 : 1. Hello 2. Goodbye
5. : 3
274 :
1. && and operator
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. 5 :
6. : 4
275 :
1.
x y
x > y y > 0 0 y
5 3
1. 1 : x 3
2. 2 : y 3
3. 3 : y 5
4. 4 : y 0
5. 5 : y -1
6. : 4
276 :
1.
x y z
x > y z = 0
z = 1
1. 1 : z 0 1
2. 2 : z 0 x = y
3. 3 : z 0
4. 4 : z 1
5. 5 : z 10
6. : 1
277 :
1.
x y z
(x + y) > z z = x + y
z = 0 z = y x
1 2 4
1. 1 : z 1
2. 2 : z 2
3. 3 : z 3
4. 4 : z 4
5. 5 : z 5
6. : 4
278 :
1. if (x <= 80 and x > 49)
279 :
1. (5+4) / 3 < 3
280 :
1. if ( ) then
else
" "
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 1
281 :
1. A B X
X=0
IF A THEN
BEGIN
IF B THEN X = 1 ELSE X = 2
END
ELSE X = 3
STOP
A B X
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. 5 :
6. : 3
282 :
1. A B X
X=0
IF A THEN
BEGIN
IF B THEN X = 1 ELSE X = 2
END
ELSE X = 3
STOP
A B X
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. 5 :
6. : 4
283 :
1. num = -1
if (num < 0) then (num = num + 1)
num
1. 1 : -1
2. 2:0
3. 3:1
4. 4:2
5. 5 :
6. : 2
284 :
1. answer = 10
if (a > 10) then answer = answer * 2
if (a < 5) then answer = answer - 1
else if (a > 7) then answer = answer + 1
1. 1 : a = 3 answer = 9
a = 8 answer = 11
2. 2 : a = 3 answer = 11
a = 7 answer = 10
3. 3 : a = 7 answer = 20
a = 8 answer = 10
4. 4 : a = 1 answer = 9
a = 7 answer = 20
5. 5 : answer = 10 a
6. : 1
285 :
1. 3
1. 1 : -9
2. 2:9
3. 3 : 21
4. 4 : -21
5. : 1
286 :
1. 1 standard output
1. 1 : printer
2. 2 : monitor
3. 3 : diskette
4. 4 : Key board
5. : 2
287 :
1. 3
1. 1 : -9
2. 2:9
3. 3 : 21
4. 4 : -21
5. : 1
288 :
1. 4
1. 1 : -9
2. 2:9
3. 3 : 21
4. 4 : -21
5. : 3
289 :
1.
10 250
20 230
30 200
50 150
1. 1 : if....then
2. 2 : if....then.....else
3. 3 : if...then...else if... ( nested if)
4. 4 : for
5. 5 : while
6. : 3
290 :
1. V 2.5
if V > 2.0 then
begin
M := 3.0 * V;
end
else
begin
M := 0.0;
end;
V :=M;
V begin...end
{..} :=
= C
1. 1 : 0.0
2. 2 : 2.5
3. 3 : 7.5
4. 4 : 10
5. : 3
291 :
1. flowchart
J
1. 1 : A, B, C, H
2. 2 : A H B
3. 3 : A B H
4. 4 : A, H C
5. 5 :
6. : 2
: 6 :
292 :
1.
#include
int main(void){
function(5);
}
void function(int i){
printf("%d ", i);
if(i==0) return;
else function(i-1);
}
1. 1:012345
2. 2:54321
3. 3:12345
4. 4:543210
5. : 4
293 :
1. Flow chart val , n y=0 ,x = 1 , k=2 ,b=9
294 :
1. A = 4 B = 2(loop)
1. 1:B=8
2. 2 : B= 16
3. 3 : B=32
4. 4 : B=64
5. 5 :
6. : 3
295 :
1. A = 1 B = 2(loop)
1. 1:B=0
2. 2 : B=2
3. 3 : B=4
4. 4 : B=6
5. 5 :
6. : 3
296 :
1. A = 5 B = 1(loop)
1. 1 : B=7
2. 2 : B=9
3. 3 : B=11
4. 4 : B=13
5. 5 :
6. : 3
297 :
1. A = 1 B = 2(loop)
1. 1 : B=0
2. 2 : B=2
3. 3 : B=4
4. 4 : B=8
5. 5 :
6. : 3
298 :
1. While Do-While
1. 1 : While Do-While
2. 2 : While Do-While
3. 3 : While Do-While
4. 4 : While Do-While
5. 5 :
6. : 3
299 :
1. n[3][3]
for (i=0; i<3; i++) {
for (j=0; j<3; j++) {
n[j][i] = i;
}
}
1. 1:0
2. 2:1
3. 3:2
4. 4:3
5. : 3
300 :
1. y algorithm
---------------------------------------------------
x=5
y=1
while (x > 0) {
x=x-1
y=y*x
print(y)
}
1. 1:0
2. 2:4
3. 3 : 10
4. 4 :
5. : 1
301 :
1. algorithm
-----------------------------------------------------------------------------
i=1 j=0
for (i = 1; i <= 4; i = i+1) {
if ((i - 1) / 2 == 0){
print(i)
j = i+1;
}
}
1. 1 : i 5
2. 2 : i 4
3. 3 : j 2
4. 4 : j 6
5. : 3
302 :
1. algorithm loop
--------------------------------------------------------------------------
x=0, y = 1, z = 5
while(x < 6) {
y=z+x
if (y < 11) {
x=y+x
}
}
1. 1:1
2. 2:2
3. 3:3
4. 4:5
5. : 2
303 :
1. sum
sum = 0;
for(i=1; i<=100; i++)
{
sum = sum +i;
}
1. 1 : sum = 0;
j = 0;
for(i=0; i<100; i++)
{
j = i+1;
sum = sum +j;
}
2. 2 : sum = 0;
j = 0;
for(i=1;i<100;i++)
{
j = i+1;
sum = sum +j;
}
3. 3 : sum = 0;
for(i=1;i<100;i++)
{
sum = sum +i;
}
4. 4 : sum = 0;
for(i=0;i<=99;i++)
{
sum = sum +i;
}
5. 5 : sum = 0;
for(i=0;i<100;i++)
{
sum = sum +i;
}
6. : 1
304 :
1. a
int a=10;
while (a >= 1)
{
a = a - 2;
}
1. 1 : 10 a 1,2,3,4,5,6,7,8,9 10
2. 2 : 10 a 10,9,8,7,6,5,4,3,2 1
3. 3 : 5 a 9,7,5,3 1
4. 4 : 5 a 10,8,6,4 2
5. 5 : 5 a 2,4,6,8 10
6. : 4
305 :
1.
int i;
for (i = 1;i < 10; i++){
if ( i > 7 ) continue;
if ( i == 5 ) break;
printf(KORAT);
}
KORAT
?
1. 1 : 10
2. 2:6
3. 3:4
4. 4:5
5. 5:7
6. : 3
306 :
1. Inifinite Loop
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 4
307 :
1. i = 0;
for (j = -2; j < 3; j++) {
i = j + i++;
} i
1. 1:2
2. 2:4
3. 3:6
4. 4 : -6
5. 5 : -4
6. : 3
308 :
1. j = k = 0;
do {
j += k;
k += 2;
} while (k < 20);
j
1. 1 : 50
2. 2 : 60
3. 3 : 70
4. 4 : 80
5. 5 : 90
6. : 5
309 :
1. Recursive Function
1.
1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
310 :
1. Nested Loops
1. 1 : Loop
2. 2 : Loop
3. 3 : Loop 1 Loop
4. 4 : Loop
5. : 3
311 :
1.
x=1
x=x+1
x > 5
1. 1 : x 1
2. 2 : x 5
3. 3 : x 6
4. 4 : x 7
5. 5 : x 8
6. : 3
312 :
1.
x y
x > y
{ x ; x = x 1 ; }
x = y
5 1
1. 1:5
2. 2:51
3. 3:5432
4. 4:54321
5. 5:543210
6. : 3
313 :
1.
BEGIN
sum = 0 ;
FOR count = 1 to n
{ sum = sum + 1 ; write(sum) ; }
END
1. 1 : 0 1 2 3 4 n
2. 2 : 1 2 3 4 n
3. 3 : 0 1 3 4 7 n + (n + 1)
4. 4 : 1 3 4 7 n + (n + 1)
5. 5 : 1 3 5 7 n
6. : 2
314 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
315 :
1. n 1 + 2 +3 +..+ n > 15 > 15
1. 1 : 5
2. 2 : 6
3. 3 : 7
4. 4 : 8
5. : 2
316 :
1. psuedocode:
a=0;
while a<20
show a on a screen;
a=a+1
a=0; end a run
1. 1:0
2. 2 : 20
3. 3 : 19
4. 4 :
5. 5 :
6. : 5
317 :
1.
S=0
X=0
WHILE X < N
BEGIN
S=S+2
X=X+1
END
STOP
N = 10 S
1. 1 : 10
2. 2 : 12
3. 3 : 20
4. 4 : 22
5. 5 :
6. : 3
318 :
1. 1 N S
1S=0
2X=1
3 WHILE X < N
BEGIN
4S=S+X
5X=X+1
END
STOP
1. 1:1
2. 2:2
3. 3:3
4. 4:4
5. 5:5
6. : 3
319 :
1. N 0
X Y
X=0
Y=N
WHILE X < N
BEGIN
X=X+1
Y=Y-1
END
STOP
1. 1 :
2. 2:0
3. 3:N
4. 4 : N/2
5. 5 : N/2 + 1
6. : 4
320 :
1. x = 0
for count = 1 to 3
x = x + count
1. 1:3
2. 2:4
3. 3:5
4. 4:6
5. 5:7
6. : 4
321 :
1. value = -1
while (value < 3)
if (value < 0) then (value = value + 1)
value
1. 1 : -1
2. 2:0
3. 3:2
4. 4:4
5. 5 :
6. : 5
322 :
1. algorithm
12345678
-------------------------------------
count = 1
while ( ___________ ) {
Show count
Show " "
count = count + 1
}
1. 1 : count <=9
2. 2 : count !=9
3. 3 : count+1<=8
4. 4 : count+1 < 10
5. : 4
323 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
324 :
1. Set A = 1 Set R = 0.2 FOR I = 1 to N do A = A*(1+R)
1. 1 : A = (1+R)^N
2. 2 : A = A*(1+R)
3. 3 : A = (1+R)*N
4. 4 : A = (1+R)(1+R)
5. 5 : A = A*(1+R)*N
6. : 1
325 :
1. DO X = X + 1; WHILE (X < 10);
326 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 5
327 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 2
328 :
1. == operator
1. 1 :
2. 2 :
3. 3 : data x
4. 4 : data x
5. 5 :
6. : 5
329 :
1.
1. 1:8
2. 2:9
3. 3 : 10
4. 4 : 11
5. 5 :
6. : 2
330 :
1. q
char check=w;
331 :
1. i j
j =0; for (i =0; i < 10 ; i =
i+2) j = j+5;
1. 1 : i = 10 j = 50
2. 2 : i = 10 j = 25
3. 3 : i = 12 j = 50
4. 4 : i = 12 j = 25
5. 5 :
6. : 2
332 :
1. i j j =2; for (i =0; i < 10 ; i =
i+2) j = j*2;
1. 1 : i = 10 j =32
2. 2 : i = 10 j = 64
3. 3 : i = 12 j = 32
4. 4 : i = 12 j =64
5. 5 :
6. : 2
333 :
1. i j j =0; for (i =1; i < 10 ; i =
i*2) j = j+2;
1. 1 : i = 10 j = 10
2. 2 : i = 10 j = 8
3. 3 : i = 16 j = 10
4. 4 : i = 16 j = 8
5. 5 : i = 16 j = 10
6. : 4
334 :
1. i j
j =1; for (i =1; i < 10 ; i =
i*2) j = j*2;
1. 1:i=8j=8
2. 2 : i = 16 j = 8
3. 3 : i = 16 j = 32
4. 4 : i = 8 j = 16
5. 5 : i = 16 j = 16
6. : 5
335 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. 5 :
6. : 2
336 :
1. i j j =0; for (i =1; i < 10 ; i =
i*3) j = j+2;
1. 1 : i = 12 j = 8
2. 2 : i = 27 j = 8
3. 3 : i = 12 j =6
4. 4 : i =27 j =6
5. 5 : i =27 j=10
6. : 4
337 :
1. (loop) j = 10; do { j = j-1; } while (j >0);
1. 1:7
2. 2:8
3. 3:9
4. 4 : 10
5. 5 : 11
6. : 4
338 :
1. (loop) j =10; do { j = j-2; } while (j >0);
1. 1:3
2. 2:5
3. 3:7
4. 4:9
5. 5 : 10
6. : 2
339 :
1. (loop) j = 10; do { j = j/2; } while (j >0);
1. 1:4
2. 2:5
3. 3:6
4. 4:7
5. 5:8
6. : 1
340 :
1. (loop) j = 10; while (j >=0) { j = j -1; }
1. 1:8
2. 2:9
3. 3 : 10
4. 4 : 11
5. 5 : 12
6. : 4
341 :
1. (loop) j = 10; while (j >=0) { j = j -2; }
1. 1:4
2. 2:5
3. 3:6
4. 4:7
5. 5:8
6. : 3
342 :
1. (loop) j = 10; while (j >=0) { j = j - 3 ; }
1. 1:3
2. 2:4
3. 3:5
4. 4:6
5. 5:7
6. : 2
343 :
1. "Test" for (i =0 ; i < 10 ; i++) { printf ("Test\n"); }
1. 1 : 9
2. 2 : 10
3. 3 : 11
4. 4 : 12
5. 5 :
6. : 2
344 :
1. "Test" for (i =0 ;i<= 10 ; i++) { printf ("Test\n"); }
1. 1:9
2. 2 : 10
3. 3 : 11
4. 4 : 12
5. 5 :
6. : 3
345 :
1. "Test" for (i = 1 ;i< 10 ; i++) { printf ("Test\n"); }
1. 1:8
2. 2:9
3. 3 : 10
4. 4 : 11
5. 5 :
6. : 2
346 :
1. "Test" for (i =1 ;i<= 10 ; i++) { printf ("Test\n"); }
1. 1:8
2. 2:9
3. 3 : 10
4. 4 : 11
5. 5 :
6. : 3
347 :
1. "Test" for (i =0 ;i< 10 ; i=i+2) { printf ("Test\n"); }
1. 1:4
2. 2:5
3. 3:6
4. 4:7
5. 5:8
6. : 2
348 :
1. "Test" for (i =1 ;i< 10 ; i=i*2) { printf ("Test\n"); }
1. 1:2
2. 2:3
3. 3:4
4. 4:5
5. 5 :
6. : 3
349 :
1.
1. 1:a=4b=8
2. 2:a=4b=7
3. 3 : a =5 b= 8
4. 4 : a =5 b= 7
5. 5 :
6. : 2
350 :
1.
1. 1 : a = 5 b =6
2. 2 : a = 5 b =7
3. 3:a=4b=6
4. 4 : a = 4 b =7
5. 5 :
6. : 1
351 :
1. matrix m x n 2 matrix
1. 1 : 4
2. 2 : 2
3. 3 : 1
4. 4 : 3
5. : 4
352 :
1. 10
1. 1 : 1 10
2. 2 : 1 9
3. 3 : 2 36
4. 4 : 2 45
5. : 2
353 :
1. for(x = 2; x <20; x+=3) x x
1. 1:8
2. 2 : 14
3. 3 : 17
4. 4 : 18
5. : 4
354 :
1.
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 1
355 :
1. x = 2; while(x<=100) x++;
1. 1 : 1-100
2. 2 :
2-100
3. 3 : 2-100
4. 4 : 2-100
5. : 3
: 7 : Arrays 1-2
356 :
1. a[] = {7,3,2,5,6}; a[3]
1. 1:7
2. 2:3
3. 3:2
4. 4:5
5. 5:6
6. : 4
357 :
1.
1. 1 : a[0]
2. 2 : a[]= {2,5,3,9} 5 a[2]
3. 3 : a[]= {2,5,3,9} a[4]
4. 4 :
5. : 1
358 :
1. Hello-World char
1. 1:9
2. 2 : 10
3. 3 : 11
4. 4 : 12
5. : 3
359 :
1. Flow chart matrix A , B ,C,E
Array a[1][1] ,b[1][1] n= 1,m=2 ,x=1,y=3
1. 1 : C[2][3]={ 12 , -10 ,35 ,5 ,9,14} A = 2 , B =2 , C=2 , E =6
2. 2 : C[2][3]={ 12 , -13 ,35 ,5 ,9,13} A = 2 , B =2 , C=3 , E = 7
3. 3 : C[2][3]={ 12 , -7 ,35 ,5 ,9,14} A = 2 , B =2 , C=2 , E =7
4. 4 : C[2][3]={ 12 , -13 ,35 ,5 ,9,14} A = 2 , B =2 , C=2 , E =6
5. : 4
360 :
1. (pseudocode)
1. 1 :
2. 2 :
3. 3 : B A C
4. 4 : C A B
5. : 1
361 :
1. (pseudocode) 7 for j = 1 to length[A]
1. 1 : C A B
2. 2 : B A C
3. 3 :
4. 4 :
5. : 4
362 :
X
1. (pseudocode)
1. 1:1
2. 2:3
3. 3:5
4. 4:7
5. : 3
363 :
X
1. (pseudocode)
1. 1:2
2. 2:4
3. 3:6
4. 4:8
5. : 3
364 :
X
1. (pseudocode)
1. 1:1
2. 2:2
3. 3:3
4. 4:4
5. : 1
365 :
1. (pseudocode) Y X
1. 1 : 12
2. 2:8
3. 3:7
4. 4:4
5. : 3
366 :
1. (pseudocode) Y
X
1. 1 : 1
2. 2 : 10
3. 3:9
4. 4 : 21
5. : 2
367 :
1.
1. 1 : loop
2. 2 : while
3. 3 : do-while
4. 4 : for
5. 5 : do-until
6. : 4
368 :
1. C[ ]
str[ ] = Hello World;
i = 0;
for (k=10; k>=0; k--){
C[k] = str[i];
i = i + 1;
}
1. 1 : Hello World
2. 2 : World
3. 3 : dlroW olleH
4. 4 : dlroW
5. : 3
369 :
1. algorithm what
----------------------------------------------------------------------
score = {1, 4, 8, 5, 6, 2}
what = score[0]
FOR (index=0; index < 6; index=index+1) {
if ( score[index] > what ) {
what = score[index];
}
}
print(what)
1. 1:1
2. 2:8
3. 3:6
4. 4:2
5. : 2
370 :
1. a[ ][ ]
int a[3][4];
int i,j;
for(i=0; i<3; i++)
for(j=0; j<4; j++)
a[i][j] = i*j;
1. 1 : 0 0 0 0
0000
0123
2. 2 : 0 0 0 0
0123
0236
3. 3 : 0 0 0 0
0123
0146
4. 4 : 0 0 0 0
0123
0246
5. : 4
371 :
1. int data[6][5][4];
20 100 ?
1. 1 : data[0][4][3] = 100;
2. 2 : data[1][4][3] = 100;
3. 3 : data[1][3][3] = 100;
4. 4 : data[0][3][3] = 100;
5. : 1
372 :
1. y = { 1, 9, 2, 6, 7 };
y[3]
1. 1:1
2. 2:9
3. 3:2
4. 4:6
5. : 4
373 :
1. y[3][3] = {{7, 4, 5}, {6, 1, 8}, {2, 3, 4}};
y[2][1]
1. 1:1
2. 2:3
3. 3:4
4. 4:6
5. : 2
374 :
1. int function_x(int x[] int len) { int temp = x[0]; for(int i=1; i
1. 1 :
2. 2 :
3. 3 :
4. 4 :
5. : 4
375 :
1. x[7] d[7] int x[8] = 0; int d[8] = 0; int k; for(k=1;k<8;k++) { x[k] =
(2*k-1); d[k] = d[k-1] + x[k]; }
1. 1 : 9, 25
2. 2 : 11, 36
3. 3 : 13, 49
4. 4 : 15, 64
5. : 4
376 :
1. x y (array) 1
x[n] = y[n]
n n 3 y[3] 4 x[3]
1. 1:1
2. 2:2
3. 3:3
4. 4:4
5. : 4
377 :
1. float float y[10][10]; y byte ( float
4 byte)
1. 1 : 200
2. 2 : 242
3. 3 : 400
4. 4 : 484
5. : 4
378 :
1.
i
count = 1 i
x[i] = i + 1
1. 1 : x[2] 3
2. 2 : x[3] 3
3. 3 : x[7] 6
4. 4 : x[7] 7
5. : 1
379 :
1.
i=8;
x[1] = 1 ; x[2] = 1 ;
count = 3 i
x[i] = x[i 1] + x[i - 2]
1. 1 : x[2] 3
2. 2 : x[3] 3
3. 3 : x[4] 3
4. 4 : x[5] 3
5. : 3
380 :
1. char fruit [5] [20] = {apple, banana, cherry, orange, strawberry}; fruit [3] [0]
1. 1 : a
2. 2 : c
3. 3 : b
4. 4 : o
5. : 4
381 :
1. int num[5] = {8,12,20,5,40}; y int y = num[1]*num[3]num[4];
1. 1 : num[0]
2. 2 : num[1]
3. 3 : num[2]
4. 4 : num[3]
5. : 3
382 :
1. pseudocode:
a: array of 2*10;
b: array of 5*2;
for a_x=1 to 2
b(a_x,a_x)=a_x;
for a_y=1 to 10;
a(a_x,a_y)=a_x*a_y;
end
end
c=a(5,2)+b(2,2);
c
1. 1:1
2. 2:2
3. 3 : 12
4. 4:7
5. : 3
383 :
1. A[1..N] N
M = A[1]
FOR K =2 TO N
IF M < A[K] THEN M = A[K]
END
1. 1 : MAX A[1..N]
2. 2 : MIN A[1..N]
3. 3 : M
4. 4 : M
5. : 1
384 :
1. A[1..N] N
A[1]=1 A[2]=2 ... A[N]=N
A[5]
FOR K = 2 TO N
A[K] = A[K-1] + A[K]
END
1. 1:5
2. 2:9
3. 3 : 11
4. 4 : 15
5. : 4
385 :
1. B[1..N, 1..N] 2 N x N
B[J,K] = B[J,K] + 1
FOR J = 1 TO N
FOR K = 1 TO J
B[J,K] = B[J,K] + 1
END
1. 1:N
2. 2 : 2N
3. 3:NxN
4. 4 : N(N+1)/2
5. 5 :
6. : 4
386 :
1. a
1. 1 : 30
2. 2 : 60
3. 3 : 90
4. 4 : 120
5. : 4
387 :
1.
a = {3,5,7,2};
b = {1,9,9,1};
b[a[3]] + a[b[3]]
1. 1 : 10
2. 2 : 12
3. 3 : 14
4. 4 : 16
5. : 3
388 :
1. 2
1. 1 : 100
2. 2 : 5
3. 3 : 10
4. 4 : 100
5. : 3
389 :
1.
1. 1 : 10
2. 2 : 20
3. 3 : 30
4. 4 : 60
5. : 2
390 :
1.
1. 1 : read(a[i,j])
2. 2 : read(a[j,i])
3. 3 : write(a[Sun,5])
4. 4 : write(a[Thurs,5])
5. : 3
391 :
1. n=6
1. 1 : [7,6,5,4,3,2,1]
2. 2 : [1,1,1,1,1,1,1]
3. 3 : [7,7,7,7,7,7,7]
4. 4 : [1,2,3,4,5,6,7]
5. : 4
392 :
1. A
4 X 4
393 :
A 8
1. Array 1 20 (Index) 5
1. 1 : A[8] := 20;
2. 2 : A[5] := 20 ;
3. 3 : Readln( A[5] )
4. 4 : For i := 1 to 8 Do Readln( A[i] ) ;
5. : 2
394 :
1. Var A : Array [0..10] of integer; B : Array [1..10] of real; C : Array [1..2,-1..3,1..3,0..3] of integer;
Array B 0
1. 1 : B[1..10] := 0;
2. 2 : B := 0;
3. 3 : For i := 1 to 10 do B[i] := 0;
4. 4 :
5. : 3
395 :
1. Var A : Array [0..10] of integer; B : Array [1..10] of real; C : Array [1..2,-1..3,1..3,0..3] of integer; C
Array (Dimension) (Element)
1. 1 : 4 , 54
2. 2 : 4 , 96
3. 3 : 4 , 120
4. 4 : 2x2 , 96
5. : 3
396 :
1.
For i := 1 to 5 Do For j := 1 to 3 Do Readln (X[i,j]) ; X ?
1. 1 : 3
2. 2 : 5
3. 3 : 8
4. 4 : 15
5. : 4
397 :
X 5
1. 16 Array
398 :
1.
B := A[ i,j,k ] ; ( Dimension ) A
1. 1:1
2. 2:2
3. 3:3
4. 4:4
5. : 3
399 :
1. Array A : Array[A..F,5..7] of Real ; Array A
1. 1 : 1
2. 2 : 9
3. 3 : 18
4. 4 : 20
5. : 3