NEW
Font size
WorksheetsC Language
Total questions: 18
Worksheet time: 10mins
Which of the following is not a valid C variable name?
int number;
float _rate;
int variable_Count;
int $main;
What is the value of "z" in this code?
The value of z is 10
The value of z is 15
The value of z is 15.6
The value of z is 16
What will be the output of this code?
OK
KO
Depends on compiler
Depends on standard
What is the correct way of initializing an array in C?
int arr[4]= 1,2,3,4 ;
int arr[4]= (1,2,3,4) ;
int arr[4]= {1,2,3,4 };
int arr[4]= [1,2,3,4 ];
A function that calls itself is known as _________.
Repetation
Retention
Recursion
looping
How to write a single line comment?
/* Comment */
/* Comment
//Comment//
//Comment
_________used to give tab spaces in c programming.
/n
\t
\r
\n
The program that translates your code from a high-level language to the binary language is called ________.
programmer
compiler
translator
linker
What is meant by "a" in the following C operation?
Attatch
Append
Apprehend
Add
scanf() is a predefined function of _______ header file.
stdlib.h
conio.h
stdio.h
stdarg.h
What is the output of this statement "printf("%d", (a++))" ?
The value of (a + 1)
The current value of a
Error message
Garbage
Which statement can print \n on the screen?
printf("\\n");
printf("n\");
printf("n");
- printf('\n');
_______________to be included to use standard I/O functions : prinf(),scanf()
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<math.h>
The user can also write one or more statements in one line by separating semicolon (;)
True
False
Which is correct example for variable declaration?
int a;b;c;
Int a,b,c;
int a,b,c;
int a,b;c;
The sizeof operator returns the size of its operand in bytes
True
False
Every C statement ends with ------------?
.
;
,
}
