c-basics-1

Quiz
•
Computers
•
10th Grade - Professional Development
•
Medium
Viv viv
Used 4+ times
FREE Resource
24 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
char userInput [3] ;
int difference = strcmp(userInput, "yes");
Given that userInput is set to "yes", what is the value of difference?
Enter a number below:
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do we compare two strings?
strcmp(str1, str2)
str1 = str2
str1 == str2
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a declaration?
Saying what a variable or function is equal to
Saying that a variable or function exists
An error statement
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following :
int age = 12;
How do we print the variable age?
print("%d", age);
printf("%d", age);
printf("%s", age);
printf(age);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following string declaration:
char userInput[30];
How do we get input and store it in userInput?
fscanf(stdin, "%d", userInput);
fscanf(stdin, userInput);
input(stdin, userInput);
fscanf(stdin, "%s", userInput);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do end the program programmatically?
Hint: Programmatically means through the c code
exit(0);
break;
end;
exit;
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Define a boolean type variable called isUgly and set it equal to true
Create a free account and access millions of resources
Similar Resources on Wayground
26 questions
String in C Programming

Quiz
•
University
20 questions
TECHFEST QUALIFYING ROUND

Quiz
•
University
20 questions
1st Year quiz

Quiz
•
University
25 questions
C Language Test 3

Quiz
•
Professional Development
20 questions
C Code Master

Quiz
•
Professional Development
25 questions
C Language Test - 2

Quiz
•
Professional Development
20 questions
C - Strings

Quiz
•
University
20 questions
EST102 : PROGRAMMING IN C TEST 1

Quiz
•
University
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade