Prog

DraftCreated
    English
  1. Other
  2. University
  3. Juliet Paulo
Preview as student
Worksheet Image

Republic of the Philippines Ilocos Sur Polytechnic State College Tagudin, Ilocos Sur Tel. No. (077) 732-55-49/email address: www.ispsc.edu.ph COLLEGE OF ARTS AND SCIENCES FUNDAMENTALS OF PROGRAMMING MIDTERM EXAMINATION Name: Date: Year & Sec: Score: II. Multiple Choice. Choose the letter of the correct answer. (15pts) 1. It can be a keyword, an identifier, a constant, a string literal, or a symbol. a. Tokens b. Comma c. Semicolon d. Comments 2. Are like helping text in your C program and they are ignored by the compiler. a. Tokens b. Comma c. Semicolon d. Comments 3. It is referred as statement terminator. a. Tokens b. Comma c. Semicolon d. Comments 4. When was the C Programming language formalized by ANSI? a. 1990 b. 1986 c. 1988 d. 1987 5. It is the term used in C to describe blanks, tabs, newline characters and comments. a. Blank b. Semicolon c. Whitespace d. Comments 6. Are predefined, reserved words used in programming having special meanings to the compiler. a. Tokens b. Keywords c. Semicolons d. Comments 7. This determines the type and size of data associated with variables. a. Data Type b. Literal c. Variable d. Format Specifiers 8. It can be defined as the operators which are used in association with printf() function for printing the data that is referred by any object or any variable. a. Data Type b. Literal c. Variable d. Format Specifier 9. It is a value or identifier whose value cannot be altered in a program. a. Data Type b. Literal c. Variable d. Format Specifier 10. A name given to a memory location that is used to hold value. a. Data Type b. Literal c. Variable d. Format Specifier 11. Which of the following is not a valid identifier? a. 1apple b. mohd c. _july d. abc

Worksheet Image

12. How to declare an integer typed variable named age? a. char age; b. int age; c. int age: d. float age; 13. The output of this statement is? printf(“Pretty!!!”) ; a. “Pretty!!!” b. Pretty c. Pretty!! d. Pretty!!! 14. The output of this statement is? printf(“Good\b”); a. “Good” b. God c. Good\b d. Goo 15. The output of this statement is? printf(“Good\n”); printf(“Job”); a. Good b. “Good Job” Job c. Good Job d. “Good Job!” II. IDENTIFICATION. Identify the following that is being asked. (10pts) 1. An action or process in creating or writing a program. 2. Prepares the instructions of a computer program. 3. It is a set of rules that provides a way of telling a computer what operations to perform. 4. Natural language of a particular computer 5. A program that is used to convert assembly language programs into machine code 6. It is a series of instructions for executing some step by step process 7. It is the graphical or pictorial representation of an algorithm with the help of different symbols, shapes and arrows in order to demonstrate a process or a program 8. It is a general-purpose, high-level language that is is used for wide range of applications from Operating systems like Windows and iOS. 9. The first publicly available description of C is known as_______. 10. The files you create with your editor and they contain the program source codes.

Worksheet Image

III. True or False. Write T if the statement is True and F if the statement is False. (10 pts) 1. = is the most common assignment operator. 2. Prefix increment operator adds one to its operand. 3. Addition is an example of an Arithmetic Operator. 4. Assignment operator are used to give a variable a value. 5.Modulo Operator computes the remainder. 6. We use %d format specifier to print character types. 7. We use %c format specifier to print integer types. 8. getchar() is an input function that reads single character from stdin. 9. scanf() is an output function commonly used to take input from the user. 10. We use %lt format specifier to print double types.