A Programming Exercises With Answers :)
A Programming Exercises With Answers :)
Identifythefollowing:
1.Acategoryofprogramminglanguagewhereinstructionsarewrittenin0’sand1’s.
2.Itisasetofgrammaticalrulesforinstructinga
computeroranycomputingdevicetoperformspecific tasks.
6.Acategoryof programminglanguagethatisusedbyprimitivemachines.
7. Itisaprogramminglanguagethatfollows,in order,asetofcommands.
8.Itisthefastesttranslator programs.
9.Itis
acategoryofprogramminglanguagewhereinstructionsarewritteninmnemoniccodes/symbols.
10.Examplesofthisprogramminglanguageare C++,Java,VB.NET,etc
Answers..
1. Machine Language
2. Programming Language
3. Translator Program
4. Software/System/Application
5. Interpreter
6. Machine Language
7. Procedural language
8. Assembler
9. Low-level language
Name: Score:
Section: Professor:
MatchingType.MatchColumnAwiththecorrectansweronColumnB,writeonlytheletterofansweront
heblankprovided.
ColumnA ColumnB
8.ThisprogramexecutionphasetranslatestheCprograminto h.Preprocess
machine language code.
9.Ittakestheexecutableimagefromdiscandtransferitto memory. i.Compiling
10. This program execution phase j.Linking
allowstheprogrammertotypethe programwithaneditorprogram.
Answers:
1. E
2. D
3. J
4. A
5. H
6. C
7. F
8. I
9. B
10.G
M1:L3-Enrichment Activity
Name: Score:
Section: Professor:
Applyingthestructureandexampleprovidedinthislesson.Writeasimpleprogramthatdisplaysyour“R
EGINA”onyour screen.
M1:L4-Enrichment Activity:
Name Score:
Section: Professor:
Name: Score:
Section: Professor:
1. Write an input statements that will allow the user to store integer value to num variable.
a. int num;
a. char a[20];
b. char b;
3. Writeanoutputstatement forthenumber1 task.
4. Write different output statements for the number 2 task.
a.
b.
M1:L6-Enrichment Activity
Name: Score:
Section: Professor:
Name Score:
Section: Professor:
IdentifyifitisV-valid orI–invalidnameofvariables.
V 1.MyName
I 2.Firstnumber
V 3.void
I 4.num*1
V 5.2ndnumber
I 6.sum;
V 7.HaveAGreatDay
V 8.NAME
I 9._sample
I 10.Number-1
M1:L8-Enrichment Activity
1. arithmetic/mathematical operators
3. assignment operators
4. relational operators
5. logical operators
7. comma
8. size of operators.
M1:L9-Enrichment Activity
Name: Score:
Section: Professor:
FALSE
2) 6%3%4+9+3/10/5
FALSE
3) 6>=5&& 10==10
TRUE
4) !(!(3<4||5>=2)&&8>1)
TRUE
II. Programming.