NEW
Font size
WorksheetsTechZoom24-BugBash_Prelims
Total questions: 25
Worksheet time: 25mins
Which of the following is not a valid C variable name?
float rate;
int variable_count;
int $main;
int number;
Which of the following statements best explains why C is not considered a platform-independent programming language?
C does not have a standard specification.
C programs cannot be compiled on different operating systems.
C code is not capable of running on embedded systems.
C code may rely on platform-specific features and behaviors.
What is #include ?
Preprocessor directive
Inclusion directive
File inclusion directive
None of the mentioned
What is meant by 'a' in the following C operation? fp = fopen("Random.txt", "a");
Attach
Append
Apprehend
Add
What will be the output of the following C code?
Compile time error
Hello World! 34
Hello World! 1000
Hello World! followed by a junk value
What are mandatory parts in the function declaration in c?
return type, function name
return type, function name, parameters
parameters, function name
parameters, variables
Which is more effective while calling the functions?
call by value
call by reference
call by pointer
call by object
What will be the output of the following C++ code?
23
43
compile time error
30
What will be the output of the following C++ code?
11
7
9
8
What is the scope of the variable declared in the user defined function?
whole program
only inside the {} block
the main function
header section
When we define the default values for a function?
When a function is defined
When a function is declared
When the scope of the function is over
When a function is called
If an argument from the parameter list of a function is defined constant then _______________
It can be modified inside the function
It cannot be modified inside the function
Runtime Error occurs
Segmentation fault
What will be the output of the following C++ code?
10
0
error
segmentation fault
In debugging, what does the term "breakpoint" refer to?
A point where the program crashes
A point where the program execution pauses for inspection
A point where the program's output is displayed
A point where a specific condition is met in the code
What is the purpose of a stack trace in debugging?
To visualize the memory layout of the program
To track the execution flow of the program
To display the contents of variables
To identify memory leaks
What is the primary purpose of debugging in software development?
To add new features to the software
To remove syntax errors from the code
To optimize the performance of the software
To ensure that the software functions correctly and as expected
What does a segmentation fault error indicate in a C or C++ program?
Syntax error in the code
Memory access violation
Logical error in the code
Infinite loop
What is the likely outcome of implementing recursion without a base condition in a recursive function?
The program will terminate normally.
The program will run with decreased efficiency
The program will crash due to a stack overflow error.
The program will enter an infinite loop without any output.
23.What will be the output of the following Java code?
0
5
15
16
What will be the value of x after executing the following C code?
4
5
6
Compilation Error
What will be the output of the following C code?
38
39
40
41
What is the output of the following Java code snippet?
2147483648
-2147483648
Compilation error
Runtime error
What will be the output of the following C code?
4
18
16
32
What will be the output of the following C++ code?
16
15
14
compilation error
What will be the output of the following C code?
0
1
2
compilation error
