Font size
Worksheetsສອບເສັງກາງພາກ C programming 1CEEE
Total questions: 99
Worksheet time: 1hrs 12mins
ຄຳສັ່ງຕ່າງໆ ຂອງໂປຣແກຣມພາສາຊີຈະຕ້ອງຢູ່ພາຍໃນເຄື່ອງໝາຍໃດ.
( )
{ }
[ ]
/* */
ຂໍ້ໃດໃຊ້ຟັງຊັນ scanf() ໄດ້ຖືກຕ້ອງ.
scanf(“%d\n”,x);
scanf(“%d”,x);
scanf(“%d\n”,&x);
scanf(“%d,x”);
ຖ້າເຮົາຕ້ອງການໃຊ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຕົວອັກສອນ ຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມຕົວໃດ.
%f
%s
%x
%c
ຖ້າຫາກ a ມີເລກຈຳນວນເຕັມຢູ່ ຖ້າຫາກຕ້ອງການເພີ່ມ a ອີກ 1 ຄ່າຈະເຮັດແນວໃດ.
a++;
a += 1;
++a;
ຖືກທຸກຂໍ້
ຖ້າຂຽນຊຸດຄຳສັ່ງຕໍ່ໄປນີ້ ຢາກຮູ້ວ່າຈະພີມ GO ຈັກຄັ້ງ.
#include <stdio.h>
void main()
{ int i;
for(i=1;i<10;i++)
printf("GO\n");
}
8 ຄັ້ງ
9 ຄັ້ງ
10 ຄັ້ງ
11 ຄັ້ງ
ຂໍ້ໃດບໍ່ຖືກຕ້ອງກ່ຽວກັບລູບ for.
ສາມາດເພີ່ມຄ່າ ຫລື ລຸດຄ່າໄດ້
ສາມາດມີຕົວລັບໄດ້ຫລາຍກວ່າໜື່ງໄດ້
ກວດສອບເງື່ອນໄຂກ່ອນການເຮັດລູບ
ຖືກໝົດທຸກຂໍ້
ຂໍ້ໃດທີ່ບໍ່ຈຳເປັນຕ້ອງມີໃນການຂຽນໂປຣແກຣມ.
#define
#include
{ }
main( )
ຂໍ້ໃດຄຶຄວາມໝາຍຂອງ %d.
ໃຊ້ກັບຕົວລັບທີ່ເປັນຂໍ້ຄວາມ
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຈຳນວນເຕັມ
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຖານ 16
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກເສດ
ຂໍ້ໃດຄຶຄວາມໝາຍຂອງ %f.
ໃຊ້ກັບຕົວລັບທີ່ເປັນຂໍ້ຄວາມ
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຈຳນວນເຕັມ
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຖານ 16
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກເສດ
ຂໍ້ໃດຄຶຄວາມໝາຍຂອງ %x.
ໃຊ້ກັບຕົວລັບທີ່ເປັນຂໍ້ຄວາມ
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຈຳນວນເຕັມ
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຖານ 16
ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກເສດ
ຂໍ້ໃດຄຶຕົວຫຍໍ້ຂອງ stdio.h.
standdart input output heeader file
Standdart input output hender file
standdart input outpot header file
standard input output header file
ຂໍ້ໃດຄຶຕົວຫຍໍ້ຂອງ conio.h.
console input output header file
console inpot output header file
consule input output header file
console input output hender file
ໃນປີໃດທີ່ເພີ່ນໄດ້ຂຽນຊື່ພາສາຊີຂື້ນມາ ໂດຍມີຊື່ວ່າ: The C Programming Language
1970
1980
1978
1975
ຂໍ້ໃດຄຶຕໍາທີ່ໃຊ້ໃນການຮັບ ແລະ ສະແດງຂໍ້ມູນ
printf(); scant();
scant(); get();
printf();
put(n );
ຜິດໝົດທຸກຂໍ້
ໂຄງສ້າງຂອງໂປຣແກຣມຫຼັກ 2 ພາກສ່ວນຄຶ:
header and <stdio.h>
getch( ); and main( )
body and printf
header and body
ສ່ວນຫົວຂອງໂປຣແກມມີນາມສະກຸນວ່າແນວໃດ
main() ແມ່ນຫຍັງ?
process
library
function
data
#include < ? > ? ມີຄວາມໝາຍແນວໃດ
file name
object file
function
header file
ນາມສະກຸນຂອງຟາຍ ທີ່ໄດ້ຫລັງຈາກການ complie & run ຄຶ:
.cpp / .exe
.obj / .cpp
.obj / .exe
.h / .cpp
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
hi
hello
no
error
ເມື່ອເຮົາລັນໂປຣແກຣມນີ້ແລ້ວຜົນໄດ້ຮັບຄຶ:
int main()
{
int a = 9/3;
printf("%d",a);
return 0;
}
3.33
3.0
3
0
ເມື່ອເຮົາລັນໂປຣແກຣມນີ້ແລ້ວຈະອອກຫຍັງຂື້ນມາ
#include <stdio.h>
int main()
{
Printf("Hello World! %d \n", x);
}
Hello World! x;
Hello World! followed by a junk value
Compile time error
Hello World!
Who developed the C language?
Ken Thompson
Bjarne Stroustrup
Dennis Ritchie
Kernighan
ສັນຍາລັກທີ່ໃຊ້ໃນການລົງແຖວຄຶ:
\n
\t
\d
\f
ຜົນໄດ້ຮັບຈາກການລັນໂປຣແກມນີ້ໄດ້ແນວໃດ
(a)
What is the output of this program?
100
200
30
500
Find the output of the program
b=100 c=200
b=100 c=garbage value
b=garbage value c=200
b=300 c=200
ເມື່ອລັນໂປຣແກຣມຂ້າງລຸ່ມຜົນໄດ້ຮັບຄຶຂໍ້ໃດ
for(int i = 0; i < 10; i++)
cout << i << " ";
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9
Infinite Loop
Cpp Compiler converts source code in
.cpp file
.obj file
.exe file
.lnk file
ເຮົາຈະສາມາດສະແດງ \n ເທີງຫນ້າຈໍໄດ້
Which of the following correctly shows the hierarchy of arithmetic operations in C?
/ + * -
* - / +
+ - / *
/ * + -
To print out 'a' as an integer and 'b' as a decimal, which of the following printf() statement will you use?
printf("%f %lf", a, b)
printf("%f %f", a, b)
printf("%d %f", a, b)
printf("%f %d", a, b)
Which of the following is not logical operator?
&
&&
||
!
1. What will be the output of the following C code?
No Output
TESTING
Compiler error
None of the above
1. What will be the output of following program?
1 2 3 4 5
1 2 3 4
6
5
What will be the output of the program?
Compiler error
10 10 10 10 10
11 12 13 14 15
None of the above
What will be the output of the program?
No Output
32 33 34
32 33 34 35
Compiler error
What is the output of this program?
32
33
30
No Output
Which of the given statement is true about the given code ?
RABBIT is printed unlimited number of times
RABBIT
Compiler error
None of the above.
What will be the output of following program ?
RABBIT
RABBIT is printed unlimited number of times.
No Output
Compiler error.
How many times i value is checked in the following C code?
2
3
4
1
How many times i value is checked in the following C code?
2
3
4
1
What will be the output of following program ?
H
H is printed infinite times
Compile time error
No output
"0" is a ___?
double
int
string
None of the above
0.0 is a ___?
double
int
int
None of the above
How do we print the number 75 to our screen?
cout << 75
cout 75;
cout(75);
cout << 75;
What is the correct way to comment in C++ programming?
//
#
<!--->
All of the above
Which part of the following code is ignored by the computer?
cout << "Comments";
// print the output
Both
None
What is the output of the following code?
Good Morning
Good Morning5
5
Error
Which of the following is the correct value for the test variable?
19
19.5
"nineteen"
"19"
What's the output of this code?
power_level over power_level
power_level over 9000
9000 over 9000
9000 over power_level
What's the output of this code?
25.5
25.5
66.6
535.259
66.6
535.259
What's the output of this code?
Number is number
Number is 18
Number is
18
Error
What's the output of this code?
London\nis beautiful
London is beautiful
London
is beautiful
Londonis beautiful
Which of the following statements is correct?
char letter = "a";
char letter = 'a';
char letter = 'ab';
char letter = 5.6;
Commonly used input function is --------------
scanf()
printf()
getch()
putch()
The symbol of a new line character is -----------------------
\n
\t
\d
\f
What is the result of 6%4 ?
4
3
2
1
When was the C Language developed?
1970
1972
1975
1976
Who developed the C language?
Ken Thompson
Bjarne Stroustrup
Dennis Ritchie
Kernighan
Every statement in a C program should end with a -------------
Colon(:)
semicolon(;)
comma(,)
fullstop(.)
ການໃຊ້ຟັງຊັນ printf() ຂໍ້ໃດບໍ່ຖືກຕ້ອງ
printf("Laos");
ຖ້າຕ້ອງການໃຫ້ມີການລົງແຖວໃຫມ່ຈະຕ້ອງໃຊ້ລະຫັດໃດຄວບຄຸມໃນຟັງຊັນ printf()
ຖ້າຫາກຕ້ອງການໃຫ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຕົວເລກເສດຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມໂຕໃດ
ຖ້າຫາກຕ້ອງການໃຫ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຕົວເລກຈຳນວນເຕັມຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມໂຕໃດ
ຖ້າຫາກຕ້ອງການໃຫ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຂໍ້ຄວາມ ຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມໂຕໃດ
C is developed by______________
Dennis Franklin
Dennis williams
Dennis Ritche
Dennis John
"ໃນກວດສອບ Source code ວ່າຖືກຕ້ອງ ຫຼື ບໍ່" ຂັ້ນຕອນໃດໃນການພັດທະນາໂປຣແກຣມພາສາຊີ
float ສາມາດຕັ້ງເປັນຊື່ຕົວແປໄດ້ ຫລື ບໍ່
ໄດ້
ບໍ່ໄດ້
"60,000" ຄວນເລືອກໃຊ້ລະຫັດແບບໃດໃນການເກັບຂໍ້ມູ້ນ
ຫາກນັກຮຽນຕ້ອງການຂຽນ ໂປຣແກຣມເພື່ອຄຳນວນຄ່າ "ໜື່ງຄູນໜື່ງ" ຈະມີວິທີການຂຽນໂປຣແກຣມແນວໃດ
ຂໍ້ໃດເປັນການປະກາດຕົວແປຣທີ່ຖຶກຕ້ອງ
ສ່ວນຟັງຊັນຫຼັກໃນການຂຽໜໂປຣແກຣມພາສາຊີຄືຂໍ້ໃດ
ສັນຍາລັກໃດທີ່ຕ້ອງໃຊ້ຈົບຄຳສັ່ງຂອງໂປຣແກຣມທຸກແຖວ
ຂໍ້ໃດບໍ່ຈຳເປັນໃນການຂຽນໂປຣແກຣມ
ຂໍ້ໃດທີ່ໃຫ້ຄວາມໝາຍຖືກຕ້ອງກັບຕົວແປຣ "Hello"
ຕົວແປຣປະເພດ ຂໍ້ຄວາມ, ຄຳນວນໄດ້
ຕົວແປຣປະເພດຂໍ້ຄວາມ, ຄຳນວນບໍ່ໄດ້
ຕົວແປຣປະເພດອັກສອນ, ຄຳນວນໄດ້
ຕົວແປຣປະເພດອັກສອນ, ຄຳນວນບໍ່ໄດ້
ພາສາຊີມີລັກສະນະແນວໃດ
ພາສາຊີເປັນພາສາທີ່ລວມຂໍ້ມູ້ນຂອງພາສາລະດັບສູງ ແລະ ລະດັບຕໍ່າເຂົ້າໄວ້ດ້ວຍກັນ
ພາສາຊີເປັນພາສາທີ່ລວມຂໍ້ມູ້ນຂອງພາສາເຄື່ອງທີ່ສາມາດໃຊ້ງານໄດ້
ພາສາຊີເປັນພາສາທີ່ລວມຂໍ້ມູ້ນຂອງພາສາເຄື່ອງ ແລະ ລະດັບຕໍ່າເຂົ້າໄວ້ດ້ວຍກັນ
ຖືກໝົດທຸກຂໍ້
ພາສາ C ມີໂຄງສ້າງ ຫຼື ບໍ່
ມີໂຄງສ້າງ
ບໍ່ມີໂຄງສ້າງ
ມີ ແລະ ບໍ່ມີໂຄງສ້າງ
ມີແລະ ບໍ່ຮູ້ໂຄງສ້າງ
ພາສາເຄື່ອງມີລັກສະນະແນວໃດ
ເປັນພາສາທີ່ປະກອບໄປດ້ວຍຕົວເລກລ້ວນໆ ເຮັດໃຫ້ເຄື່ອງຄອມພິວເຕີສາມາດທຳງານໄດ້ທັນທິ
ເປັນພາສາທີ່ສາມາດໃສ່ອັກສອນເພີ່ມໄດ້
ເປັນພາສາທີ່ມີຄວາມໝາຍເປັນອັກສອນ
ເປັນພາສາທີ່ປະກອບໄປດ້ວຍອັກສອນ ແລະ ຕົວເລກ
int main()
{
char arr[7]="Network";
printf("%s", arr);
return 0;
}
Network
N
Garbage Value
Compilation error
ຂໍ້ໃດເປັນການປະກາດຂໍ້ມູ້ນທີ່ ບໍ່ ຖຶກຕ້ອງ
int age;
int x, int y;
int i=0;
int n, sum = 0;
ຂໍ້ໃດເປັນການຕັ້ງຊື່ທີ່ຖຶກຕ້ອງຕາມຫຼັກການຕັ້ງຊື່ຂອງພາສາຊີ
_apple
go@home
7eleven
if
int main()
{
int a = 10, b = 25;
a = b++ + a++;
b = ++b + ++a;
printf("%d %d n", a, b);
}
36 64
35 62
36 63
30 28
Which one of the following is a loop construct that will always be executed once?
for
while
switch
do while
Directives are translated by the
Pre-processor
Compiler
Linker
Editor
The switch statement takes a given integer value then seeks a matching value among a number of _______ statements.
break
case
switch
goto
How many number of Keywords available in C Programming?
32
45
55
56
Which specifier is suitable for character data type?
%c
%d
%f
%e
How many number of bytes used for float Data type?
8
4
16
32
C Programming Language was developed in the year ----------
1990
1992
1972
1980
C Programming was invented by -----------------------
Dennis Ritchie
E.Balagurusamy
Richard Fairly
David Boehm
ອາຈານສອນວິຊາພຶ້ນຖານການຂຽນໂປຣແກຣມ
(a)
ເບີໂທອາຈານສອນວິຊາ ພື້ນຖານການຂຽນໂປຣແກຣມແມ່ນຫຍັງ?
(a)
ວິຊາພື້ນຖານການຂຽນໂປຣແກມມີຈັກໜ່ວຍກິດ
(a)
ລະຫັດວິຊາພື້ນຖານການຂຽນໂປຣແກມ
(a)
ເມື່ອທຳງານຕາມໂປຣແກມຕໍ່ໄປນີ້ສຳເລັດ ຕົວແປ x ຈະມີຄ່າເທົ່າກັບຂໍ້ໃດ
int x = 4;
x = x + 2;
x -= 1;
x++;
4
5
6
7
ຂໍ້ໃດເປັນການປະກາດຕົວແປຣທີ່ຖຶກຕ້ອງ
