• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/52

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

52 Cards in this Set

  • Front
  • Back

moduloe operator

%

what will print


int x=1


int y=0


y=++x;


print (y)

2

int x=1


int y=0;


y=x++;




printf (y)

1

what value equates to false

0

what is tru


the break statement causes a loop to do what

terminate

what keyword is used to creat a constant value

const

what does the continue statment do

proceed to the next line

what decision making statement allows you to choose between distinct cases

switch statement

you can use a variable declared" before the body of a do loop in the condition of a do loop


or


" " in the body of a do loop in the condition of a do loop

first is true second maybe

what is the of the elemets of a for loop

for(initialization; conditon; increment) statement

what is true


if you declare a variable in the inital section, you may use the variable after the for loop concludes


or


you declare a varainle in the initial sect of a for loop

the first statemtn is false the second is corret



global variable


why are global bads casue are easy to accidently redine or because are difficult to keep track of where they update

Both are true easy to accidently redifine and hsrd to know were and when its updated

what function allows you to print on screen

printf

what is the name of the function that programs run at exectution

int main

which is valid if statemetn

if (1===1) printf("true"); else


the one with the ;

which if statement will it print out whit a lot of if and else!

it goes with the first if statement

WHAT WILL BE THE LAST THING PRINTED


long else if, if, and whatevens



a=2

what is the equal to operator

==

which of the following operaors perfoms a logical negation

!a

which loops runs a specified number of times

for

which loop is executed only if specified conditions are met

while statment but could be for

which type of look is executed at least once

do while loop

which is true


you can use a variable declared in the body of a loop outside the loop


or


can use a varianle declared before a loop inside the body of a loop

only the second one is true

what creastes a preprocessor constant

#define

whcih escpae sequence produces a carriage return

\r

scanf for a float

scanf ("%f)

define automatic scoping

aka block level once declared its everywhere

which is true


1, can override a variable from an outer scope by redefining it within an inner scope


or


2. if you override a variable within an inner scope it reverts to the old value when you exit the outer scope

both are true

what would you use to specfy the possible values in a switch statements

case

what doe you use as a global else in switch statement

default

what statement is used to prevent a switch statemtn from executing more than one case

break

what is after the loop


int i=0


do prindf("%d\n", i); while (++i <5);

4,

int i=0;


for (i=0; i<5; i++) printf("%d", i);

4

which preprocessor directive allows you to use printf

#include <stdio.h>

which if statement is true


1, the if statemetn may be stacked to have multi outcomes


2, " " can have multiple statments for each condition



both

int x=0;


inty=1;


int z ;


z=++x+y++;


printf("%d, z);

2

int a=1;


int b=2;


int c=3;


int d=4;


printf("%d\n", c- a %b +d);

6

int a=1;


if (1==a){


a=2;}



its 2 within the {} and 1 outside the {}

which is tru (signed numbers)


1 the bits of the number are expressed in reverse


2. a second variable must be used to express sign





both are false

which is true


you can use a #define constant in a case statement


2, you can use a const in a case statement

only const can be used within a case statement

which is true


1, you can use the same case statment multi times within the same switch statements


2, you can stack multi case statemetns within the same switch statement

first one is false, second is true

int i =0;


while (++i <5) printf("%d", i );

4,

int i=0;


do printf(%d\n", ++i); while (++i<5);

5

int i;


for (i =0; i>5; i++) printf ("%d", i);

0

int i=0;


for (int i=0; i<5; i++) printf(" %d", i);

4

which is true


1,and int is always larger than a short


2,the size of an int varies by compilar

the first is false idk about the sec one true

which operator will execute first

idk

what will print out


int a =1


if (1==a){


int a=2;


}

2 within the {} 1 outside the {}

int a=1;


switch (a){


case 0:


a =1


break;


case....

Another one is missing a break after case 1 and the answer to that one is 3!

int i=0;


while (i++<5) printf (%d,
++i);

6

one has all the proper breaks!

that one is 2

what is generally used to define automatic scooping

{}