Programming test 1

Ace your homework & exams now with Quizwiz!

Why is machine language not ideal for humans?

.It's hard to learn, decipher and understand. It's binary It's tied to an architecture and not portable. All of the above

High level languages require software to convert the source code to machine code. What is the file extension for a C program?

.c

High level languages require software to convert the source code to machine code. What is the file extension for an executable file?

.exe

What will the following line cause to happen?/* ABCD /*

An error will result.

This high-level language has been around for many years, and was once used to write most business applications.

COBOL

One of the three main parts of any computer system, this is the brain. It's where the instructions are executed.

CPU

Which of the following would be considered the "brain" of the computer?I/O CPU Memory

CPU

The name of the IDE that is used in our lab is

Ch

Which of the following are programming languages? Check all that apply.Cobol UNIX Linux C++ Windows Java

Cobol C++ Java

Microsoft's first operating system that ran on the original IBM PC.

DOS

What will happen if the correct grammar rules for C are not followed?

Errors will result, and the compiler will not be able to convert the program to machine language

An interpreter can convert a high-level language into machine language that the microprocessor can understand, but a compiler cannot.

False

An operating system is hardware, not software.

False

C and Java are both types of operating systems.

False

If you are able to compile your program without any errors, it means that your program works correctly.

False

It is important for the user to have a clear understanding of the C programming language.

False

It is not necessary to follow all of the grammar rules of the C compiler. If you do not follow these rules, the compiler will still be able to convert your program into machine language.

False

It is not necessary to remove all errors before running your program.

False

Memory, CPU, and I/O: A computer needs two of these three parts in order to function well.

False

Normal programming statements go between the parentheses ( ) of a function and must end with a colon.

False

Programs written in a high-level language are usually much longer than programs written in assembly language.

False

Spell-checking is a task performed by the operating system, not application software.

False

The include <stdio.h> line must have a semicolon at the end.

False

If you are using a program or operating system where you use a mouse and click, as opposed to typing written commands, you are using a(n)

GUI

It's one of the three main parts of any computer system. Examples are printers, keyboards, and scanners.

I/O

What is wrong with this line?#include (stdio.h)

Instead of parentheses, should be < >

IDE stands for

Integrated development environment

Which of the following is NOT an operating system?OS/2 Vista DOS XP Windows Java

Java

This operating system will run on PCs, but it does not come from Microsoft.

Linux

Which of the following is NOT a high-level programming language?BASIC C++ Java Linux COBOL PASCAL

Linux

Suppose that you get an error message when you try to run your program. What should you do?

Look over the error messages and try to determine why your program could not be compiled.

This is the operating system used on Apple's Macintosh computers

MAC OS

What will the following line cause to happen?/* This program displays the temperature on the screen. */

Nothing will happen as a result of this line.

Suppose that your are to write a program that takes a number from the user and displays its square root on the screen. Where will you, the programmer, put the number to be squared?

Nowhere. That number will be entered by the user, not the programmer.

This relatively recent programming method has revolutionized computer programming, and has made debugging and updating software much more efficient.

OOP

This single-user computer has a microprocessor as its CPU.

PC

______________ is a high level description of a program.

Pseudo-code

Memory that is wiped out when power is lost is

RAM

Memory that is retained when power is lost is

ROM

If you hit "Run" in the IDE and there are no errors in the program, what happens?

The program will run. You can now check the program from the user's perspective.

Which of the following is not a reason for using comments in your program?

To show the user how to execute the program properly.

A C program can have no comments, or it can have 500 comments. It makes no difference to the execution of the program.

True

A comment begins with /* and ends with */.

True

Clicking on the "Run" button will cause the IDE to attempt to convert your program to machine language.

True

Every program should contain a main function.

True

If you use // instead of /*, it doesn't need anything at the end, but the comment only lasts for a single line.

True

It is necessary to save your program before you try to run it.

True

It is not necessary for the program user to have a thorough understanding of C programming.

True

Object-oriented programming languages are easier to debug and update than older traditional programming languages

True

Retrieving information from a disk drive is the job of the operating system, not the application software.

True

The beginning and end of a function is indicated by brackets { }.

True

The include <stdio.h> line must be included in any program that contains a printf line.

True

The only language understood by computers is machine language, which consists of binary numbers.

True

The return 0 line must be followed by a semicolon.

True

This operating system has been around for many years, and was developed primarily for multi-user computers and mainframes.

UNIX

Which of the following are operating systems? Check all that apply.C++ Cobol UNIX Fortran Linux Windows

UNIX Linux Window

An _________________is a set of steps to solve a task.

algorithm

This software's job is to convert a program written in assembly language to a machine language program.

assembler

Dealing with 0s and 1s is difficult for humans. Therefore, we use a system of letters to represent each computer instruction. This system using letters instead of binary code is called

assembly language

A number system consisting of only 0's and 1's.

binary

Errors in your program are informally called

bugs

Collectively, the lines of your computer program can be referred to as

code

This software's job is to convert a program written in a high-level programming language and convert it to a low-level machine language program

compiler

Who or what is responsible for converting the C program that you write into machine language that the computer can understand and execute?

compiler

A programmable machine that responds to a set of instructions in a set manner.

computer

Finding and fixing errors in a computer program is referred to as

debugging

We use type specifiers (such as int, double, or char) to _______ our variables.

declare

Devices that operate using a binary system (0s and 1s) are referred to as ________ devices.

digital

A ______________ is a graphical description of an algorithm.

flowchart

In a computer system, the machinery (circuits, chips, devices) is referred to as

hardware

stdio.h is what kind of file?

header

Java, BASIC, C++, COBOL, and PASCAL are all examples of a(n)

high-level language

Which of the following is a preprocessor directive?include return printf main

include

An individual command given to a computer. A group of these forms a program.

instruction

Machine language is one. So is assembly language.

low-level language

10110001 would be a computer instruction in which language?

machine language

The ones and zeros that a computer recognizes as instructions are known as

machine language

A variable is a place in _________________ set aside to hold data.

memory

One of the three main parts of any computer system, it's where the program and program data are stored.

memory

If a computer's CPU is all on a single chip, that chip is called a(n)

microprocessor

ROM is this type of memory.

nonvolatile

Which of the following must have a semicolon at the end?

normal programming statement

In OOP, programming is viewed as a collection of cooperating __________.

objects

An _____________system runs all the software on the computer.

operating

This is the computer program that takes care of fundamental tasks such as communicating with the keyboard and disk drives.

operating system

A line that begins with # is a

preprocessor directive

An algorithm is a step by step process that solves a _________________.

problem

Collectively, a set of computer instructions is referred to as a(n)

program

Well-written programs include a lot of comments. These comments are read by the

programmer

When saving your program, be careful to

put .C after the name.

Every function in a C program must end with which statement?

return

In a computer system, the instructions and data used by the computer are referred to as

software

An extremely powerful computer that can perform hundreds of millions instructions per second

supercomputer

The role of the compiler is to

translate from C language to machine language

When checking to see if your program works correctly, the lab monitor will take on the role of ____________.

user

RAM is this type of memory.

volatile


Related study sets

Criminal Justice Systems--Chapter 8 Review

View Set

EMT: Chapter 9 [patient assessment]

View Set

Stuck In Neutral Vocabulary List

View Set

3.8 Off-Balance Sheet Activities

View Set

Stats Quiz 9 Measure of Central Tendency

View Set