wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ສອບເສັງກາງພາກ C programming 1CEEE

Total questions: 99

Worksheet time: 1hrs 12mins

Name
Class
Date
1.

ຄຳສັ່ງຕ່າງໆ ຂອງໂປຣແກຣມພາສາຊີຈະຕ້ອງຢູ່ພາຍໃນເຄື່ອງໝາຍໃດ.

a)

( )

b)

{ }

c)

[ ]      

d)

/*   */

2.

ຂໍ້ໃດໃຊ້ຟັງຊັນ scanf() ໄດ້ຖືກຕ້ອງ.

a)

scanf(“%d\n”,x);      

b)

scanf(“%d”,x);

c)

scanf(“%d\n”,&x);   

d)

scanf(“%d,x”);

3.

ຖ້າເຮົາຕ້ອງການໃຊ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຕົວອັກສອນ ຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມຕົວໃດ.

a)

%f           

b)

%s 

c)

%x       

d)

%c

4.

ຖ້າຫາກ a ມີເລກຈຳນວນເຕັມຢູ່ ຖ້າຫາກຕ້ອງການເພີ່ມ a ອີກ 1 ຄ່າຈະເຮັດແນວໃດ.

a)

a++;     

b)

a += 1;

c)

++a;      

d)

ຖືກທຸກຂໍ້

5.

ຖ້າຂຽນຊຸດຄຳສັ່ງຕໍ່ໄປນີ້ ຢາກຮູ້ວ່າຈະພີມ GO ຈັກຄັ້ງ.

#include <stdio.h>

void main()

{  int i;

for(i=1;i<10;i++)

printf("GO\n");

}

a)

8 ຄັ້ງ

b)

9 ຄັ້ງ

c)

10 ຄັ້ງ

d)

11 ຄັ້ງ

6.

ຂໍ້ໃດບໍ່ຖືກຕ້ອງກ່ຽວກັບລູບ for.

a)

ສາມາດເພີ່ມຄ່າ ຫລື ລຸດຄ່າໄດ້

b)

ສາມາດມີຕົວລັບໄດ້ຫລາຍກວ່າໜື່ງໄດ້

c)

ກວດສອບເງື່ອນໄຂກ່ອນການເຮັດລູບ

d)

ຖືກໝົດທຸກຂໍ້

7.

ຂໍ້ໃດທີ່ບໍ່ຈຳເປັນຕ້ອງມີໃນການຂຽນໂປຣແກຣມ.

a)

#define

b)

#include       

c)

{ } 

d)

main( )

8.

ຂໍ້ໃດຄຶຄວາມໝາຍຂອງ %d.

a)

ໃຊ້ກັບຕົວລັບທີ່ເປັນຂໍ້ຄວາມ

b)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຈຳນວນເຕັມ      

c)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຖານ 16

d)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກເສດ

9.

ຂໍ້ໃດຄຶຄວາມໝາຍຂອງ %f.

a)

ໃຊ້ກັບຕົວລັບທີ່ເປັນຂໍ້ຄວາມ

b)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຈຳນວນເຕັມ    

c)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຖານ 16

d)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກເສດ

10.

ຂໍ້ໃດຄຶຄວາມໝາຍຂອງ %x.

a)

ໃຊ້ກັບຕົວລັບທີ່ເປັນຂໍ້ຄວາມ

b)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຈຳນວນເຕັມ    

c)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກຖານ 16

d)

ໃຊ້ກັບຕົວລັບທີ່ເປັນເລກເສດ

11.

ຂໍ້ໃດຄຶຕົວຫຍໍ້ຂອງ stdio.h.

a)

standdart input output heeader file       

b)

Standdart input output hender file        

c)

standdart input outpot header file          

d)

standard input output header file      

12.

ຂໍ້ໃດຄຶຕົວຫຍໍ້ຂອງ conio.h.

a)

console input output header file                 

b)

console inpot output header file                   

c)

consule input output header file                    

d)

console input output hender file         

13.

ໃນປີໃດທີ່ເພີ່ນໄດ້ຂຽນຊື່ພາສາຊີຂື້ນມາ ໂດຍມີຊື່ວ່າ: The C Programming Language

a)

1970            

b)

1980           

c)

1978                

d)

1975     

14.

ຂໍ້ໃດຄຶຕໍາທີ່ໃຊ້ໃນການຮັບ ແລະ ສະແດງຂໍ້ມູນ

a)

printf();  scant();                                   

b)

scant();  get();      

c)

printf(); 

put(n );                                             

d)

ຜິດໝົດທຸກຂໍ້ 

15.

ໂຄງສ້າງຂອງໂປຣແກຣມຫຼັກ 2 ພາກສ່ວນຄຶ:

a)

header  and <stdio.h>                                             

b)

getch( );  and main( )   

c)

body and printf                                             

d)

header and body

16.

ສ່ວນຫົວຂອງໂປຣແກມມີນາມສະກຸນວ່າແນວໃດ

a)
.c
b)
.exe
c)
.h
d)
.obj
17.

main() ແມ່ນຫຍັງ?

a)

process

b)

library

c)

function

d)

data

18.

#include < ? > ? ມີຄວາມໝາຍແນວໃດ

a)

file name

b)

object file

c)

function

d)

header file

19.

ນາມສະກຸນຂອງຟາຍ ທີ່ໄດ້ຫລັງຈາກການ complie & run ຄຶ:

a)

.cpp / .exe

b)

.obj / .cpp

c)

.obj / .exe

d)

.h / .cpp

20.

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");

}

a)

hi

b)

hello

c)

no

d)

error

21.

ເມື່ອເຮົາລັນໂປຣແກຣມນີ້ແລ້ວຜົນໄດ້ຮັບຄຶ:

int main()

{

int a = 9/3;

printf("%d",a);

return 0;

}

a)

3.33

b)

3.0

c)

3

d)

0

22.

ເມື່ອເຮົາລັນໂປຣແກຣມນີ້ແລ້ວຈະອອກຫຍັງຂື້ນມາ

#include <stdio.h>

int main()

{

Printf("Hello World! %d \n", x);

}

a)

Hello World! x;

b)

Hello World! followed by a junk value

c)

Compile time error

d)

Hello World!

23.

Who developed the C language?

a)

Ken Thompson

b)

Bjarne Stroustrup

c)

Dennis Ritchie

d)

Kernighan

24.

ສັນຍາລັກທີ່ໃຊ້ໃນການລົງແຖວຄຶ:

a)

\n

b)

\t

c)

\d

d)

\f

25.

ຜົນໄດ້ຮັບຈາກການລັນໂປຣແກມນີ້ໄດ້ແນວໃດ

(a)  

26.

What is the output of this program?

a)

100

b)

200

c)

30

d)

500

27.

Find the output of the program

a)

b=100 c=200

b)

b=100 c=garbage value

c)

b=garbage value c=200

d)

b=300 c=200

28.

ເມື່ອລັນໂປຣແກຣມຂ້າງລຸ່ມຜົນໄດ້ຮັບຄຶຂໍ້ໃດ

for(int i = 0; i < 10; i++)

cout << i << " ";

a)

0 1 2 3 4 5 6 7 8 9 10

b)

0 1 2 3 4 5 6 7 8 9

c)

1 2 3 4 5 6 7 8 9 10

d)

1 2 3 4 5 6 7 8 9

e)

Infinite Loop

29.

Cpp Compiler converts source code in

a)

.cpp file

b)

.obj file

c)

.exe file

d)

.lnk file

30.

ເຮົາຈະສາມາດສະແດງ \n ເທີງຫນ້າຈໍໄດ້

a)
printf("\n");
b)
echo "\\n";
c)
printf('\n');
d)
printf("\\n");
31.

Which of the following correctly shows the hierarchy of arithmetic operations in C?

a)

/ + * -

b)

* - / +

c)

+ - / *

d)

/ * + -

32.

To print out 'a' as an integer and 'b' as a decimal, which of the following printf() statement will you use?

a)

printf("%f %lf", a, b)

b)

printf("%f %f", a, b)

c)

printf("%d %f", a, b)

d)

printf("%f %d", a, b)

33.

Which of the following is not logical operator?

a)

&

b)

&&

c)

||

d)

!

34.

1. What will be the output of the following C code?

a)

No Output

b)

TESTING

c)

Compiler error

d)

None of the above

35.

1. What will be the output of following program?

a)

1 2 3 4 5

b)

1 2 3 4

c)

6

d)

5

36.

What will be the output of the program?

a)

Compiler error

b)

10 10 10 10 10

c)

11 12 13 14 15

d)

None of the above

37.

What will be the output of the program?

a)

No Output

b)

32 33 34

c)

32 33 34 35

d)

Compiler error

38.

What is the output of this program?

a)

32

b)

33

c)

30

d)

No Output

39.

Which of the given statement is true about the given code ?

a)

RABBIT is printed unlimited number of times

b)

RABBIT

c)

Compiler error

d)

None of the above.

40.

What will be the output of following program ?

a)

RABBIT

b)

RABBIT is printed unlimited number of times.

c)

No Output

d)

Compiler error.

41.

How many times i value is checked in the following C code?

a)

2

b)

3

c)

4

d)

1

42.

How many times i value is checked in the following C code?

a)

2

b)

3

c)

4

d)

1

43.

What will be the output of following program ?

a)

H

b)

H is printed infinite times

c)

Compile time error

d)

No output

44.

"0" is a ___?

a)

double

b)

int

c)

string

d)

None of the above

45.

0.0 is a ___?

a)

double

b)

int

c)

int

d)

None of the above

46.

How do we print the number 75 to our screen?

a)

cout << 75

b)

cout 75;

c)

cout(75);

d)

cout << 75;

47.

What is the correct way to comment in C++ programming?

a)

//

b)

#

c)

<!--->

d)

All of the above

48.

Which part of the following code is ignored by the computer?

a)

cout << "Comments";

b)

// print the output

c)

Both

d)

None

49.

What is the output of the following code?

a)

Good Morning

b)

Good Morning5

c)

5

d)

Error

50.

Which of the following is the correct value for the test variable?

a)

19

b)

19.5

c)

"nineteen"

d)

"19"

51.

What's the output of this code?

a)

power_level over power_level

b)

power_level over 9000

c)

9000 over 9000

d)

9000 over power_level

52.

What's the output of this code?

a)

25.5

b)

25.5

66.6

535.259

c)

66.6

d)

535.259

53.

What's the output of this code?

a)

Number is number

b)

Number is 18

c)

Number is

18

d)

Error

54.

What's the output of this code?

a)

London\nis beautiful

b)

London is beautiful

c)

London

is beautiful

d)

Londonis beautiful

55.

Which of the following statements is correct?

a)

char letter = "a";

b)

char letter = 'a';

c)

char letter = 'ab';

d)

char letter = 5.6;

56.
How will you print \n on the screen?
a)
printf("\n");
b)
echo "\\n";
c)
printf('\n');
d)
printf("\\n");
57.
How to comment in C language?
a)
//Comment
b)
A & B
c)
* Comment *
d)
<---Comment---->
58.

Commonly used input function is --------------

a)

scanf()

b)

printf()

c)

getch()

d)

putch()

59.

The symbol of a new line character is -----------------------

a)

\n

b)

\t

c)

\d

d)

\f

60.

What is the result of 6%4 ?

a)

4

b)

3

c)

2

d)

1

61.

When was the C Language developed?

a)

1970

b)

1972

c)

1975

d)

1976

62.

Who developed the C language?

a)

Ken Thompson

b)

Bjarne Stroustrup

c)

Dennis Ritchie

d)

Kernighan

63.

Every statement in a C program should end with a -------------

a)

Colon(:)

b)

semicolon(;)

c)

comma(,)

d)

fullstop(.)

64.

ການໃຊ້ຟັງຊັນ printf() ຂໍ້ໃດບໍ່ຖືກຕ້ອງ

a)

printf("Laos");

b)
printf("12345");
c)
printf("5+2=%d",5+2);
d)
printf('COMPUTER');
65.

ຖ້າຕ້ອງການໃຫ້ມີການລົງແຖວໃຫມ່ຈະຕ້ອງໃຊ້ລະຫັດໃດຄວບຄຸມໃນຟັງຊັນ printf()

a)
\a
b)
\t
c)
\beep
d)
\n
66.

ຖ້າຫາກຕ້ອງການໃຫ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຕົວເລກເສດຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມໂຕໃດ

a)
%f
b)
%x
c)
%s
d)
%c
67.

ຖ້າຫາກຕ້ອງການໃຫ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຕົວເລກຈຳນວນເຕັມຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມໂຕໃດ

a)
%d
b)
%x
c)
%s
d)
%c
68.

ຖ້າຫາກຕ້ອງການໃຫ້ຟັງຊັນ printf() ສະແດງຜົນເປັນຂໍ້ຄວາມ ຈະຕ້ອງໃຊ້ລະຫັດຄວບຄຸມໂຕໃດ

a)
%d
b)
%x
c)
%s
d)
%c
69.

C is developed by______________

a)

Dennis Franklin

b)

Dennis williams

c)

Dennis Ritche

d)

Dennis John

70.

"ໃນກວດສອບ Source code ວ່າຖືກຕ້ອງ ຫຼື ບໍ່" ຂັ້ນຕອນໃດໃນການພັດທະນາໂປຣແກຣມພາສາຊີ

a)
Source File
b)
Complie
c)
Run
d)
link
71.

float ສາມາດຕັ້ງເປັນຊື່ຕົວແປໄດ້ ຫລື ບໍ່

a)

ໄດ້

b)

ບໍ່ໄດ້

72.

"60,000" ຄວນເລືອກໃຊ້ລະຫັດແບບໃດໃນການເກັບຂໍ້ມູ້ນ

a)
%d
b)
%c
c)
%s
d)
%f
73.

ຫາກນັກຮຽນຕ້ອງການຂຽນ ໂປຣແກຣມເພື່ອຄຳນວນຄ່າ "ໜື່ງຄູນໜື່ງ" ຈະມີວິທີການຂຽນໂປຣແກຣມແນວໃດ

a)
1x1
b)
1X1
c)
1*1
d)
1#1
74.

ຂໍ້ໃດເປັນການປະກາດຕົວແປຣທີ່ຖຶກຕ້ອງ

a)
int A;
b)
float b
c)
c char;
d)
double @D;
75.

ສ່ວນຟັງຊັນຫຼັກໃນການຂຽໜໂປຣແກຣມພາສາຊີຄືຂໍ້ໃດ

a)
#include 
b)
main()
c)
{ }
d)
;
76.

ສັນຍາລັກໃດທີ່ຕ້ອງໃຊ້ຈົບຄຳສັ່ງຂອງໂປຣແກຣມທຸກແຖວ

a)
:
b)
;
c)
{ }
d)
\
77.

ຂໍ້ໃດບໍ່ຈຳເປັນໃນການຂຽນໂປຣແກຣມ

a)
#include
b)
#define
c)
{}
d)
main()
78.

ຂໍ້ໃດທີ່ໃຫ້ຄວາມໝາຍຖືກຕ້ອງກັບຕົວແປຣ "Hello"

a)

ຕົວແປຣປະເພດ ຂໍ້ຄວາມ, ຄຳນວນໄດ້

b)

ຕົວແປຣປະເພດຂໍ້ຄວາມ, ຄຳນວນບໍ່ໄດ້

c)

ຕົວແປຣປະເພດອັກສອນ, ຄຳນວນໄດ້

d)

ຕົວແປຣປະເພດອັກສອນ, ຄຳນວນບໍ່ໄດ້

79.

ພາສາຊີມີລັກສະນະແນວໃດ

a)

ພາສາຊີເປັນພາສາທີ່ລວມຂໍ້ມູ້ນຂອງພາສາລະດັບສູງ ແລະ ລະດັບຕໍ່າເຂົ້າໄວ້ດ້ວຍກັນ

b)

ພາສາຊີເປັນພາສາທີ່ລວມຂໍ້ມູ້ນຂອງພາສາເຄື່ອງທີ່ສາມາດໃຊ້ງານໄດ້

c)

ພາສາຊີເປັນພາສາທີ່ລວມຂໍ້ມູ້ນຂອງພາສາເຄື່ອງ ແລະ ລະດັບຕໍ່າເຂົ້າໄວ້ດ້ວຍກັນ

d)

ຖືກໝົດທຸກຂໍ້

80.

ພາສາ C ມີໂຄງສ້າງ ຫຼື ບໍ່

a)

ມີໂຄງສ້າງ

b)

ບໍ່ມີໂຄງສ້າງ

c)

ມີ ແລະ ບໍ່ມີໂຄງສ້າງ

d)

ມີແລະ ບໍ່ຮູ້ໂຄງສ້າງ

81.

ພາສາເຄື່ອງມີລັກສະນະແນວໃດ

a)

ເປັນພາສາທີ່ປະກອບໄປດ້ວຍຕົວເລກລ້ວນໆ ເຮັດໃຫ້ເຄື່ອງຄອມພິວເຕີສາມາດທຳງານໄດ້ທັນທິ

b)

ເປັນພາສາທີ່ສາມາດໃສ່ອັກສອນເພີ່ມໄດ້

c)

ເປັນພາສາທີ່ມີຄວາມໝາຍເປັນອັກສອນ

d)

ເປັນພາສາທີ່ປະກອບໄປດ້ວຍອັກສອນ ແລະ ຕົວເລກ

82.

int main()


{


char arr[7]="Network";


printf("%s", arr);


return 0;


}

a)

Network

b)

N

c)

Garbage Value

d)

Compilation error

83.

ຂໍ້ໃດເປັນການປະກາດຂໍ້ມູ້ນທີ່ ບໍ່ ຖຶກຕ້ອງ

a)

int age;

b)

int x, int y;

c)

int i=0;

d)

int n, sum = 0;

84.

ຂໍ້ໃດເປັນການຕັ້ງຊື່ທີ່ຖຶກຕ້ອງຕາມຫຼັກການຕັ້ງຊື່ຂອງພາສາຊີ

a)

_apple

b)

go@home

c)

7eleven

d)

if

85.

int main()


{


int a = 10, b = 25;


a = b++ + a++;


b = ++b + ++a;


printf("%d %d n", a, b);


}

a)

36 64

b)

35 62

c)

36 63

d)

30 28

86.

Which one of the following is a loop construct that will always be executed once?

a)

for

b)

while

c)

switch

d)

do while

87.

Directives are translated by the

a)

Pre-processor

b)

Compiler

c)

Linker

d)

Editor

88.

The switch statement takes a given integer value then seeks a matching value among a number of _______ statements.

a)

break

b)

case

c)

switch

d)

goto

89.

How many number of Keywords available in C Programming?

a)

32

b)

45

c)

55

d)

56

90.

Which specifier is suitable for character data type?

a)

%c

b)

%d

c)

%f

d)

%e

91.

How many number of bytes used for float Data type?

a)

8

b)

4

c)

16

d)

32

92.

C Programming Language was developed in the year ----------

a)

1990

b)

1992

c)

1972

d)

1980

93.

C Programming was invented by -----------------------

a)

Dennis Ritchie

b)

E.Balagurusamy

c)

Richard Fairly

d)

David Boehm

94.

ອາຈານສອນວິຊາພຶ້ນຖານການຂຽນໂປຣແກຣມ

(a)  

95.

ເບີໂທອາຈານສອນວິຊາ ພື້ນຖານການຂຽນໂປຣແກຣມແມ່ນຫຍັງ?

(a)  

96.

ວິຊາພື້ນຖານການຂຽນໂປຣແກມມີຈັກໜ່ວຍກິດ

(a)  

97.

ລະຫັດວິຊາພື້ນຖານການຂຽນໂປຣແກມ

(a)  

98.

ເມື່ອທຳງານຕາມໂປຣແກມຕໍ່ໄປນີ້ສຳເລັດ ຕົວແປ x ຈະມີຄ່າເທົ່າກັບຂໍ້ໃດ

int x = 4;

x = x + 2;

x -= 1;

x++;

a)

4

b)

5

c)

6

d)

7

99.

ຂໍ້ໃດເປັນການປະກາດຕົວແປຣທີ່ຖຶກຕ້ອງ

a)
int A;
b)
float b
c)
c char;
d)
double @D;