Computer Knowledge
Programming Fundamentals
2,611 Questions
Programming fundamentals form the core logic of software development and computer science. This includes variable declarations, pointer assignments, loop iterations, and exception handling. These technical topics are regularly tested in computer knowledge and IT officer competitive examinations.
Variables and arraysPointer assignmentsLoop iterationsException handling blocksCompile time errorsFunction references
Programming Fundamentals Questions
-
If they point to the same cell in an array
-
If they point to the same variable
-
Two pointers cannot be equal
-
All of the above
-
Only (1) and (2)
E
Correct answer
Explanation
Yes, both the statements are true.
-
This function is used to convert the integer into float type.
-
This method is used to convert the string of digits into the corresponding integer.
-
This method is used to convert a string into an integer.
-
This method is used to convert the characters into string format.
-
None of the above
B
Correct answer
Explanation
This is true about ''atoi' function in C language.
-
A null pointer is a special pointer that does not point anywhere.
-
We can declare the null pointer as int *a=NULL.
-
We can declare the null pointer as int *a=0.
-
NULL is also known as pre-processor macro.
-
None of the above
E
Correct answer
Explanation
Yes, all are the true statements.
-
case
-
const
-
goto
-
all of the above
-
only (2) and (3)
E
Correct answer
Explanation
Yes, both the options are true.
-
A function pointer is a function that is used to store the address of the function.
-
Function pointers can be used to set callback functions.
-
Virtual functions are implemented by the function pointers.
-
All of the above are true.
-
Only (1) and (3) are true.
D
Correct answer
Explanation
Yes, all are the true statements.
-
const
-
native
-
import
-
case
-
break
A
Correct answer
Explanation
This is a keyword in java, but not used.
-
%NOTFOUND
-
%FOUND
-
%ISOPEN
-
%ROWCOUNT
-
%ISCLOSED
C
Correct answer
Explanation
This explicit cursor attribute evaluates to true, if the cursor is opened.
-
Catch
-
Finally
-
Try
-
InnerException
-
TargetSite
C
Correct answer
Explanation
It begins a section of code in which an exception might be generated from a code error.
-
C++ supports null pointers.
-
int *ptr[abs] is the example of array of pointer to an integer.
-
In C++, we can pass pointer to a function.
-
All of the above.
-
Only (1) and (3) are true.
D
Correct answer
Explanation
Yes, all of the above three are the true statements.
-
IndexOf()
-
ToLower()
-
Contains()
-
Trim()
-
None of the above
E
Correct answer
Explanation
All of the above are the String functions in C#.
-
Fatal error
-
Normal exit
-
Sharing
-
Error exit
-
Context switching
A
Correct answer
Explanation
Fatal error is the error caused by process due to a bug in program; for example, executing an illegal instruction.
-
Logical errors
-
Compile-time errors
-
Applets
-
Run-time errors
-
Assembler
D
Correct answer
Explanation
These are the errors that occur during execution of a program.
-
I/O length
-
I/O type
-
Dimension information
-
Compile time address
-
Runtime address
D
Correct answer
Explanation
Compile time address is not a part of I/O list.
-
jump analysis
-
index-check elimination
-
inlining
-
analysis available assignment
-
tail-call optimization
D
Correct answer
Explanation
When a compiler uses a set of assignment instructions that occur in the program for analysis, it is called analysis available assignment.
-
Instruction selection
-
Evaluation order
-
Register allocation
-
Common sub-expression elimination
-
Target program
D
Correct answer
Explanation
This is not an issue of code generator. It is a structure preserving transformation which removes repeated expression.