Preview

science 23 answers

Satisfactory Essays
Open Document
Open Document
12424 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
science 23 answers
 Many of the statements in "C" are similar to those in "Java" since
1. C is based on the design of Java.
2. C is a design ancestor of C++ and Java.
3. All programming languages use the same style of statements.
4. Both C and Java share Eiffel as a common design ancestor.
5. None of the above

 C has primitive types that are built into the language, but which of the following are not pimitive types in C?
1. bool
2. string
3. int
4. char
5. None of the above

 Whenever a boolean type result is required in C (e.g., in an "if" statement),
1. Any non-zero value represents false.
2. Only the zero (0) value represents false.
3. Only one (1) value represents true.
4. Any non-zero value represents true.
5. None of the above

 In C, "&&" and "||" are short-circuit boolean operators just like in Java, while the "&" and "|" operators in C
1. Perform full boolean evaluation.
2. Are undefined.
3. Are synonyms for "&&" and "||".
4. Perform the bitwise-and and bitwise-or functions.
5. None of the above

 The "!" operator in C is used to perform
1. Logical negation (e.g., turn "true" into "false").
2. Numeric negation (e.g., turn "-3" into "3").
3. Numeric inversion (e.g., turn "5" into "1/5").
4. Array reversal (reversing the items within an array).
5. None of the above

 The assignment operator (=) in C
1. works exactly like assignment in Java.
2. cannot be used in boolean expressions.
3. can be used in arithmetic expressions.
4. returns the value assigned as its value.
5. None of the above

 Which pairs of operators can be easy to confuse but difficult to notice and debug because they can often (though not always) yield the same results?
1. + and ++
2. = and ==
3. & and &&
4. | and ||
5. None of the above

 This example of a pre-increment operator, "x = 12; array[++x] = 3;", assigns
1. "array[12]" the value of 3
2. "array[13]" the value of 3
3. "array[12]" the value of 4
4. "array[13]" the value of 4
5. None of the

You May Also Find These Documents Helpful

  • Good Essays

    Science Final Part1

    • 6737 Words
    • 27 Pages

    The direction and length of a straight line from the starting point to the ending point of an object’s motion is displacement.…

    • 6737 Words
    • 27 Pages
    Good Essays
  • Satisfactory Essays

    When two conditions are joined by the AND logical operator, both of the conditions must be…

    • 4553 Words
    • 34 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Science 115

    • 593 Words
    • 2 Pages

    What does it mean to be a member of Phylum Chordata, Subphylum Vertebrata? fishes; amphibians; reptiles; birds; mammals…

    • 593 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Prg 211

    • 393 Words
    • 2 Pages

    An if statement is basically a single block of instructions where the test condition have been met, then the statements will be executed sequentially. Otherwise, the statements are skipped over if the test condition failed.…

    • 393 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    12 science

    • 5098 Words
    • 21 Pages

    If a woman does not become pregnant after treatment with medical and surgical techniques, she may choose to undergo more complex procedures, called ART, after consulting with her health care provider.…

    • 5098 Words
    • 21 Pages
    Good Essays
  • Good Essays

    6. Conditional expressions used in a While statement have the same components as conditional expression used in what other control construct?…

    • 610 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Cis Wk2

    • 317 Words
    • 2 Pages

    7. A(n) array is a sequence of primitive data elements stored in sequential storage locations.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mod Operator (P15) Xor Operator (P17) Is Operator (P18) And (P15) If Not (P17) Or Operator (P16) Like Operator (P17)…

    • 9138 Words
    • 37 Pages
    Satisfactory Essays
  • Powerful Essays

    Unix Operating System

    • 5458 Words
    • 22 Pages

    Kernighan, Brian W., and Ritchie, Dennis M., the C Programming Language, Prentice-Hall Software Series, second edition, 1988.…

    • 5458 Words
    • 22 Pages
    Powerful Essays
  • Satisfactory Essays

    Compiler translates a high-level program in a separate machine language program while the interpreter is a program that both translates and executes the instructions in a high-level language program.…

    • 256 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Java Test

    • 469 Words
    • 2 Pages

    Q3. “ X extends Y “ is correct if and only if X is a class and Y is an interface.…

    • 469 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Empower the Masses

    • 827 Words
    • 4 Pages

    C is made up entirely of building blocks which have a particular ‘shape’ or form .A program is made up of functions, functions are made up of statements and declarations surrounded by curly braces { } .One and only one of these functions in the program must have the name main(). This function is always the starting point of a C program . The parentheses ‘()’ which follow the name of the function must be included even though they apparently serve no purpose at this stage.…

    • 827 Words
    • 4 Pages
    Powerful Essays
  • Powerful Essays

    Manual - Turbo C Revised

    • 4321 Words
    • 18 Pages

    C is a general-purpose programming language, which features economy of expression, modern control flow and data structures and a rich set of operations. It has been called as “system programming language” because it is useful for writing compilers and operating systems.…

    • 4321 Words
    • 18 Pages
    Powerful Essays
  • Good Essays

    What will be output of following c code? #include int main(){ int *p1,**p2; double *q1,**q2; clrscr(); printf("%d %d ",sizeof(p1),sizeof(p2)); printf("%d %d",sizeof(q1),sizeof(q2)); getch(); return 0; } (a)1 2 4 8 (b)2 4 4 8 (c)2 4 2 4 (d)2 2 2 2 (e)2 2 4 4 Answer: (d) Exp: Size of any type of pointer is 2 byte (In case of near pointer) (5) What will be output if you will compile and execute the following c code? #include int main(){ char huge *p=(char *)0XC0563331; char huge *q=(char *)0XC2551341; if(p==q) printf("Equal"); else if(p>q) printf("Greater than"); else printf("Less than"); return 0; }…

    • 1011 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    C++ Reviewer

    • 450 Words
    • 2 Pages

    There are following relational operators supported by C++ language Assume variable A holds 10 and variable B holds 20 then: Operator == != > = B) is not true. (A = B) is not true. (A (arrow) Cast & * Description sizeof operator returns the size of a variable. For example sizeof(a), where a is integer, will return 4. Conditional operator. If Condition is true ? then it returns value X : otherwise value Y Comma operator causes a sequence of operations to be performed. The value of the entire comma expression is the value of the last expression of the comma‐separated list. Member operators are used to reference individual members of classes, structures, and unions. Casting operators convert one data type to another. For example, int(2.2000) would return 2. Pointer operator & returns the address of an variable. For…

    • 450 Words
    • 2 Pages
    Satisfactory Essays