stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Programming Concepts Flashcards | StudBud
Explore
/
Programming Concepts
Programming Concepts
15 terms
·
StudBud Administration
·
15 plays
Imported from external platform
Flashcards
15 cards
F
Practice quiz
P
Host live
L
Questions
15
Answers
1
Consider the following code for a function definition
Type casting
Type Coercion
Ignoring of types
Explicit type conversion
2
In Java, a constructor
implements the behaviour of objects
change the state of a object
provides information about the state of an object
initialises objects
3
What is wrong with the following python code ?
No parameter given for the function
Assigned C variable used as local variable
Print called within function block
function called without print( )
4
Which of the following is an example of a syntax error in C?
Int i = 20;
double myInt = 2.0;
double myInt = 2.0;
int _i = 20;
5
In Python, which of the following does not accept duplicates ?
Tuples
Array
Set
List
6
It is optional to have parameters in a defined function.
False
True
7
In Java, a class can inherit from
only one class and only one interface
only one class and multiple interfaces
multiple classes and only one interfaces
multiple classes and multiple interfaces
8
Function prototypes consist of :
Return type
Libraries
Body
Comments
9
In C, a parameter is defined as
the value passed to a function at runtime
what appears in the definition of the function
a variable declared and instantiated in the function
a local reference to a global variable in the function
10
A statically typed programming language is one where,
types may be ignored
types are discovered at execution time
types are fixed at compile time
types are always enforced
11
Which of the following is the main purpose of Functions?
To create beautiful code
To maximize reuseability
To provide no effect to a program
To create complex program
12
What is the output from the given Python code ?
"ssib"
"sib"
"ssi"
"sibl"
13
Struct consist of which of the following (Select multiple answers) :
Variable members
Main Function
Struct Instance
Nothing
14
In Java, variables are polymorphic. Polymorphic variables ...
do not have types
hold objects of only one type
can hold objects of more than one type
ignore their types
15
The code below is written in a new programming language called GAMMA. Looking at line 2, we could say that GAMMA is
a statically typed language
a dynamically typed language