WorksheetsC Basic Data Types & Operators
Total questions: 48
Worksheet time: 2hrs 45mins
Who is know as founder of C language
Dennis Ritchie
Bjarne Stroustroup
Tim Berner Lee
Rasmus Ledorf
C is a
Low level language
Assembly language
Medium level language
High level language
Which punctuation ends most of the lines of C code?
.
;
,
" "
The starting point of C execution at
==
main()
function()
!=
What do you think is the best way to enhance your skill in programming
Study Hard
Practice
Practice and learn new
Study one day and leave it
Prewritten packages are imported to program by using which symbol
Hint: Header Files
%
-
#
//
Find if the condition is True or False where int x=10; y=12;
x < y
1 (True)
0 (False)
What do you think is the output for the below code snippet?
int main(){
int a=10,b=20;
printf("%d", b/a);
}
Error
0.2
2
30
What do you need to import stdio.h a header file?
Just a waste of time
To run the code
It helps in compilation to binary coded file
To perform input and output operations
printf is a
function
variable
datatype
operator
#include <stdio.h>
int main()
{
int a = 2;
int b=11 ;
printf("%d\n", a+b*a);
}
26
24
20
None
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = b + a % c;
printf("%d", d);
}
7
5
0
Compile time error
format specifier of a float number is
%c
%d
%f
%x
int main ()
{
int x = 24, y = 39, z = 45;
z = x + y;
y = z - y;
x = z - y;
printf ("n%d %d %d", x, y, z);
}
24 39 63
39 24 63
24 39 45
39 24 45
C Language is developed at ___________?
AT & T's Bell Laboratories of USA in 1972
AT & T's Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
C programs are converted into machine language with the help of
An Editor
A compiler
An operating system
None of these.
Which one of the following is not a valid identifier?
_examveda
1examveda
exam_veda
examveda1
Which is the only function all C programs must contain?
start()
system()
printf()
main()
Program is a list of_______________, written in a _______________________ to determines the behaviour of a machine.
word, english
instructions , programming language
instructions, word
A flowchart is a graphical representation that helps programmer to develop algorithms in programming.
True
False
#include<stdio.h> is important line in c. The stdio.h contains information on input output routines.
True
False
___ is used to translate source code instructions into the appropriate machine language instructions
Module
Library routine
Compiler
Preprocessor directives
A ____ is a set of instructions that the computer follows to solve a problem.
Comipler
Linker
Program
Operator
The program written by the programmer with high level language is called:
Object Code
Syntax
Source Code
Runtime Library
What is the extension of C program source code?
.cpp
.py
.c
.java
What is machine language?
A language used by car
Machine language is made of 1's and 0's
Machine language is made of 7's and 8's
A language that only understands plain English
Which of the following is not a high level programming language?
Assembly
C++
Java
Python
The words if, else, auto, float etc. have predefined meaning and users cannot use them as variables.
These words are called
keywords
identifier
data types
constant
C language is a
structured program
object oriented program
oriented program
basic program
What function is use to display a message?
printf
output
Symbolic constants are defined in (a) section.
All variables used in the program are declared in (a) part of main function.
user defined functions are contained in (a) section.
int main()
{
int a = 25%10;
printf("%d", a);
return 0;
}
5
2
2.5
5.5
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
24
3
23
4
What is the output of the following printf
printf("%d",34+24/12%3*5/2-4);
35
-2
34
38
What is the output of the following printf:
printf("%d",14%-4);
2
-2
3
0
What is the output of the following printf:
int a=1,2,3,4;
printf("%d",a);
1
2
3
4
Compile time error
What is the value of X in the sample code given below?
X = ( 2 + 3) * 2 + 3;
10
13
25
28
A name having a few letters,numbers and special character _(underscore) is called
Keywords
reserved words
Identifier
None of the above
99%9
0
1
10
15
10/3%2
2
1.56
10
1
15/(3+4)*8
37
16
0
72
5-10+3
which operation will be performed first?
addition
subtraction
Operator % in C Language is called.?
Percentage Operator
Quotient Operator
Modulus
Division
