The C programming language

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What are the 3 parts of a 'for' statement?

(a = 0; a < 10; a++) The first part is the initialization. The second part is the conditional. The third part is the iteration variable.

What is the difference between a string and a character array?

A string is an array of characters which has a special 'null 0' element at the end to indicate the last character of the string.

What function must every C program have?

Every program must have the main() function

What does #include do?

It includes a set of libraries for use by the program

What are the increment and decrement operators?

a++, means add 1 to a a--, means subtract 1 from a

What are the 'and', 'or', and 'not' operators?

and = && or = || not = !

What statements can be used to define a loop?

for loop while loop

What is the format of an 'if' statement?

if (a == 0) { printf("a = 0"); }

What is the format of a function call?

int main() The int defines the return type of a function. Arguments pass to the function go inside the parentheses.

How do you define an array?

type arrayName [ arraySize ]; where type is the data type of the array.


Kaugnay na mga set ng pag-aaral

Logic of American Politics Final Exam Ch.1-14, AMERICAN GOV FINAL REVIEW

View Set

Module 5 - Tafseer Methodology Qualifications of a Mufassir

View Set

Mental Health Online Practice A & B with NGN

View Set

Chapter 15: Infection and Human Immunodeficiency Virus Infection

View Set