Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

BABCOCK UNIVERSITY

ILISAN-REMO, OGUN STATE, NIGERIA.


SCHOOL OF COMPUTING AND ENGINEERING SCIENCES
COMPUTER SCIENCE DEPARTMENT

MID-SEMESTER MARKING GUIDE


SESSION: 2017/2018 SEMESTER: 2
COURSE CODE: COSC 102 CREDIT UNIT:3
COURSE TITLE: Intro to Programming in C++ TIME ALLOWED: 30 mins
Total score: 15Marks

1. Bjarne Stroustrup
2. Object orientation and additional standard libraries
3. Strongly typed means variable must be declared before use
4. Preprocessor directives contain the definition of some predefined fuctions like
<iostream> has the definition of functions like cin and cout.
Executable statements are line of codes written by a programmer to perform his
specific intention. E.g. x = x +1; // to increase the value of x by 1.
5. Const int day = 7;
6. cout<<”\“CHURCH BOYS RUN FROM STRANGER\’S CLUB:\tDOES IT MATTER\?\” ”
7. #define SMALLER(x, y) ((x)<(y) ? (x) : (y) )
8. #define SQUARE(x) (x * x)
9. Dice not defined
10. The lifespan of a local variable is the function within which it is declared
11. Global variable is declared outside all the functions in a program and that is usually
before the main() function.
int x; // x is a global variable here
int main(){….}
12. The local variable takes precedence within the same program
13. The scope of a parameter within a function is local to that function
14. Given that x =5, Y =6;
x%y = 6
++x = 6
y++ = 6
15. if(x >=10 && x <=15) {…..}

You might also like