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
B
Correct answer
Explanation
In COBOL, a period ('.') terminates the entire IF statement structure. In line 3, 'MOVE 200 TO VALUE-B.' has a period at the end, which prematurely terminates the outer 'IF A > B' statement. Thus, the subsequent 'END-IF' lines will cause compiler errors as they are unmatched.
A
Correct answer
Explanation
In COBOL, the EXIT statement performs no operation when executed. It serves as a paragraph terminator or control transfer point but takes no action.
A
Correct answer
Explanation
OWB generates validated, deployment-ready code through its design environment with built-in validation and error checking. While no tool guarantees absolutely error-free code in all scenarios, OWB's code generation engine is designed to produce syntactically correct and executable code.
A
Correct answer
Explanation
OWB (Oracle Warehouse Builder) includes validation features, code generation capabilities, and debugging tools that help reduce errors in ETL code. It provides a structured environment that minimizes manual coding errors through its visual design interface and built-in validation rules.
C
Correct answer
Explanation
The setParameter method sets 'bar' to 'foo'. The getParameter method then retrieves the value of 'bar', which is 'foo'. This is basic parameter storage and retrieval in Symfony - the key 'bar' holds the value 'foo'.
A
Correct answer
Explanation
In CICS, a HANDLE CONDITION command establishes an error handling routine that remains active for the duration of the program. The only way to deactivate or modify it before program termination is to issue another HANDLE CONDITION command, which either replaces or augments the existing condition handler.
-
INTERPRETTED
-
NATIVE
-
BOTH
-
None of these
A
Correct answer
Explanation
When a converter throws an exception during value conversion, JSF marks the component as invalid. The isValid() method of the UIComponent (or the field's validator) returns false because the conversion failure sets the valid flag to false, preventing further processing.
B
Correct answer
Explanation
Traditional Unix filesystems (like ext2/3) typically use 12 direct pointers in the inode structure. These directly point to data blocks containing file data. Additional indirect pointers (single, double, triple) handle larger files that exceed the capacity of direct pointers.
B
Correct answer
Explanation
An initial value property in Oracle Forms sets the default value for an item when a record is created, but this value can be altered programmatically using triggers like When-New-Form-Instance, When-New-Block-Instance, or When-New-Record-Instance. The statement incorrectly claims it cannot be changed.
-
#MYVAR
-
$MYVAR
-
$$MYVAR
-
$$$MYVAR
C
Correct answer
Explanation
Mapping variables use the double dollar sign prefix ($$) in Informatica. Single dollar sign ($) is for session parameters, triple dollar sign ($$$) is invalid, and hash (#) is used for comments. The double dollar sign correctly identifies mapping parameters and variables.
-
NATIVE
-
INTERPRETTED
-
BOTH
-
NONE
A
Correct answer
Explanation
Native compilation provides better performance for procedures with looping structures because it compiles directly to machine code, eliminating interpretation overhead. Interpreted compilation translates line-by-line at runtime, which is slower for repeated loop iterations.
-
Normal Procedure
-
Overloaded Procedure
-
Packaged Procedure
-
None of these
C
Correct answer
Explanation
In Oracle PL/SQL, subprogram overloading (defining multiple procedures with the same name but different parameters) is only supported within packages or as local subprograms, making it a packaged procedure feature here.
-
Having the data type different
-
Just interchange the input parameter
-
having the name diffferent
-
both a & b
B
Correct answer
Explanation
In program overloading, procedures are distinguished by their parameter signatures (number, order, and data types). Simply interchanging parameter positions doesn't create a unique signature - 'proc(a,b)' and 'proc(b,a)' where both are the same data type are ambiguous. You need different data types, counts, or names.
-
OPEN
-
FETCH
-
PARSE
-
None, cursor for loops handle cursor opening implicitly
D
Correct answer
Explanation
A PL/SQL cursor FOR loop automatically manages opening, fetching, and closing the cursor. You do not need to issue explicit OPEN, FETCH, or CLOSE statements.