NEW
Font size
Worksheets14 Sep_2022 Technical quiz
Total questions: 50
Worksheet time: 25mins
Recognize the name of person
Steve Jobs
James Gosling
Dennis Ritchie
Rasmus Lerdorf
What is the 16-bit compiler allowable range for integer constants?
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
main()
{printf("G L Bajaj");
main();}
Wrong statement
It will keep on printing G L Bajaj
It will Print G L Bajaj once
None of the these
Which of the following is not a valid C variable name?
int number;
float rate;
int variable_count;
int $main;
All keywords in C are in ____________
LowerCase letters
UpperCase letters
CamelCase letters
None of the mentioned
main()
{
int i = 2;
{
int i = 4, j = 5;
printf("%d %d", i, j);
}
printf("%d %d", i, j);
}
4525
2525
4545
None of the these
What is the output of this statement "printf("%d", (a++))"?
The value of (a + 1)
The current value of a
Error message
Garbage
main()
{
int a = 1, b = 2, c = 3:
printf("%d", a + = (a + = 3, 5, a));
}
6
9
12
8
Why is a macro used in place of a function?
It reduces execution time.
It reduces code size.
It increases execution time.
It increases code size.
How many times will the following loop execute?
for(j = 1; j <= 10; j = j-1)
Forever
Never
0
1
Which one of the following is a loop construct that will always be executed once?
for
while
switch
do while
Directives are translated by the
Pre-processor
Compiler
Linker
Editor
Which of the following is NOT possible with any 2 operators in C?
Different precedence, same associativity
Different precedence, different associativity
Same precedence, different associativity
All of the mentioned
What is #include <stdio.h>?
Preprocessor directive
Inclusion directive
File inclusion directive
None of the mentioned
scanf() is a predefined function in______header file.
stdlib. h
ctype. h
stdio. h
stdarg. h
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 10000;
int y = 34;
printf("Hello World! %d\n", y);
return 0;
}
Compile time error
Hello World! 34
Hello World! 1000
Hello World! followed by a junk value
What will be the output of the following C code?
#include <stdio.h>
int main()
{
signed char chr;
chr = 128;
printf("%d\n", chr);
return 0;
}
128
-128
Depends on the compiler
None of the mentioned
#include <stdio.h>
// Assume base address of "GeeksQuiz" to be 1000
int main()
{
printf(5 + "MCA Department");
return 0;
}
MCA Department
Department
1005
Compile time error
In C, parameters are always
Passed by value
Passed by reference
Non-pointer variables are passed by value and pointers are passed by reference
Passed by value result
Which of the following is not a storage class specifier in C?
auto
register
static
volatile
Study the following program:
main()
{
char x [10], *ptr = x;
scanf ("%s", x);
change(&x[4]);
}
change(char a[])
{
puts(a);
}
If abcdefg is the input, the output will be
abcd
abc
efg
Garbage
How many characters can a string hold when declared as follows?
char name[20]:
18
19
20
None of the these
What will the result of num1 variable after execution of the following statements?
int j = 1, num1 = 4;
while (++j <= 10)
{
num1++;
}
11
12
13
14
Which of the following is true for variable names in C?
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
What is the result of logical or relational expression in C?
True or False
0 or 1
0 if an expression is false and any positive number if an expression is true
None of the mentioned
Functions in C Language are always _________
Internal
External
Both Internal and External
External and Internal are not valid terms for functions
If addition had higher precedence than multiplication, then the value of the expression (1 + 2 3 + 4 * 5) would be which of the following?
27
47
69
105
What will be the output of this program?
int main()
{
int a=10, b=20;
printf("a=%d b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("a=%d b=%d",a,b);
return 0;
}
a = 20, b = 20
a = 10, b = 20
a = 20, b = 10
a = 10, b = 10
The following statements are about EOF. Which of them is true?
Its value is defined within stdio.h
Its value is implementation dependent
Its value can be negative
All of the these
What does this statement mean?
x - = y + 1;
x = x - y + 1
x = -x - y - 1
x = x + y - 1
x = x - y - 1
Study the following array definition
int num[10] = {3, 3, 3};
Which of the following statement is correct?
num[9] is the last element of the array num
The value of num[8] is 3
The value of num[3] is 3
None of the above
What will the output after execution of the following statements?
void main()
{
int i = 065, j = 65;
printf ("%d %d", i, j);
}
065,65
53,65
65,65
Syntax error
Array is a _________ data structure.
Non-linear
Primary
Linear
Data type
Which of the following statement is correct about the C language?
The C language is a binary language with some extra features.
The C language is a high-level language with some low features.
The C language is a mid-level language with some high features.
The C language is a low-level language.
Study the following statement
printf ("%d", 9/5);
1.8
1.0
2.0
None of the these
Who defines the user-defined function?
Compiler
Computer
Compiler Library
Users
Which of the following operations cannot be performed in file handling?
Open the file
Read the file
To write a file
None of the these
In which of the following modes, the user can read and write the file?
r
w
r+
b+
Which of the following operator's precedence order is correct (from highest to lowest)?
%, *, /, +, -
%, +, /, *, -
+, -, %, *, /
%, +, -, *, /
Study the following program:
main ()
{
if(5 < '5')
printf("5")
else
printf("Not equal to 5.")
}
What will be the output of this program?
ENQ
5
I
Not equal to 5
What is the output of this code?
main() {
int y=3;
if(y & (y=8) ^ 9)
printf("true %d\n",y);
else
printf("false %d\n",y);
}
true 8
false 8
true 9
false 9
What is output?
main()
{
if (!(((~0 == 1) || 1&2 || 0)))
if(!0 || !1==0)
printf("yes\n");
else
printf("Hello\n");
else
printf("no\n");
}
yes
Hello
no
None of the these
What is output?
main() {
int x = 8;
x = x << 2;
printf("%d\n", x);
32
64
128
256
What will be output?
main() {
int x=1,y=1;
while ( x++ < 3 && x + y < 5);
printf("%d",x);
}
4
7
5
3
What will be the output?
main()
{
int x = 6;
int *p = &x;
int *k = p++;
int r = p - k;
printf("%d", r);
}
1
3
6
4
Observe this image and tell, how quickly we can reach end of each path?
BFS
DFS
Stack
None of the these
First operating system designed using C programming language.
DOS
Windows
Unix
Mac
If the function returns no value then it is called ____
Data type function
Calling function
Main function
Void function
C Language is a successor to which language.?
FORTRAN
D Language
BASIC
B Language
What is the present C Language Standard.?
C99 ISO/IEC 9899:1999
C11 ISO/IEC 9899:2011
C05 ISO/IEC 9899:2005
C10 ISO/IEC 9899:2010
