NEW
Font size
WorksheetsCS1010 Lab 01
Total questions: 11
Worksheet time: 6mins
What is the correct file extension for C source files?
.java
.c
.cpp
.cfile
Which of the following is NOT a basic data type in C?
integer
real number
character
string
Consider the function foo(). What is the value of b at Line A?
foo() causes an error.
value of variable b cannot be determined
b contains the value of 15
b contains the value of 5
b contains the value of 75
In a flowchart, which symbol is used to represent a decision point?
diamond
rectangle
oval
arrow
What function would calculate the weighted mean given a list L and weights W :
divide(sum(multiply(L, W)), W)
multiply(mean(L), mean(W))
divide(sum(multiply(L, W)), sum(W))
sum(divide(multiply(L, W), W))
Given the mathematical function for the variance of a list L :
Which function represents this operation?
mean(subtract(L, square(mean(L))))
sum(square(subtract(L, mean(L))))
divide(square(subtract(L, mean(L))), n)
mean(square(subtract(L, mean(L))))
For the operation of standardizing a list L, which function is correct?
divide(L, stddev(L))
subtract(L, mean(L))
divide(subtract(L, mean(L)), stddev(L))
divide(subtract(L, stddev(L)), mean(L))
How many bits minimally are needed to represent number 0-64?
5
6
7
8
Which of the following is not a data type in C?
int
short
long
real
What is the size of an int data type in C on a 32-bit system?
1 byte
4 bytes
16 bytes
32 bytes
Which is true about unsigned and signed data type?
unsigned type uses less bytes
signed data type represent only non-negative numbers.
signed type can represent more values
unsigned type cannot represent negative values
