CreviewSolution

CreviewSolution - 5. In C, what symbol is used to designate...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. What is the output of the following code? #include <stdio.h> int main (void) { int i = 7; int j = 3; int amount; amount = i % j; printf ("The amount is %d\n", amount); return 0; } 2. In C, declare an integer variable named temp . int temp; 3. In C, write a statement to input an integer value from the user and store it in the variable temp. scanf (“%d”, &temp); 4. In C, write an instruction to print the following (on 2 lines) : Happy Easter printf (“Happy \n Easter”);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 5. In C, what symbol is used to designate the address of a variable? &amp; 6. In C, what symbol is used to terminate an instruction or statement? ; (semicolon) 7. What symbols group multiple C statements together as one statement? { } 8. What are the final values of X, Y, and TEMP after the following statements? X = 6; Y = 2; TEMP = X; X = 3; X = Y; Output: The amount is 1 Y = TEMP; X = ____ 2______ Y = ______ 6_____ TEMP = ___ 6______...
View Full Document

Page1 / 2

CreviewSolution - 5. In C, what symbol is used to designate...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online