imperative programming languages/applications | functional programming languages/applications | random category <3 | the operating system | Data Structures, Algorithms and Theory |
---|---|---|---|---|
It will not execute.
If you put the return statement or System.exit () on the try or catch block, will the finally block execute?
|
What are higher order functions
functions that take functions as arguments or return functions.
|
Never gonna run around and desert you
Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you
Complete the full main chorus to the following song:
"never gonna give you up never gonna let you down..." |
10 and 11
What is the output of the following program:
main( ){ int a = 10; if ((fork ( ) == 0)) a++; printf (“%dn”, a ); } |
16
tell me the output of this recursive program:
int fun(int n){ if (n == 4) {return n;} else {return 2*fun(n+1);} } int main(){ printf("%d ", fun(2)); return 0; } |
the number 14
What would be the output if I run the following code block in python?
list1 = [2, 33, 222, 14, 25] print(list1[-2]) |
avoid using parentheses
In Haskell, the $ operator is used to?
|
What is a red flag
which term is defined as an indicator that you should not be around or with a certain person (ex. they make peter griffin impressions on the first date)
|
What is Virtual Memory
known as the illusion of large main memory
|
Quick Sort
Which of the following is not a stable sorting algorithm in its typical implementation: Insertion Sort, Merge Sort or Quick Sort?
|
local variable
Whenever there is a local variable with the same name as that of a global variable, the compiler gives precedence to which variable in C++?
|
What is backtracking?
This term is defined as: When a sub-goal fails in Prolog, the Prolog system moves its steps backwards to the previous goal and tries to re-satisfy it
|
Scotland
The unicorn is the national animal of which country?
|
a software interrupt
System calls are usually invoked by using:
|
2
How many queues are needed to implement a stack? Think about the situation where no other data structure are available to you
|
What is Ruby
I am an open-source, dynamic, object-oriented scripting language made in the 90s. I was made to be used for web servers, DevOps, web scraping and crawling. Which language am I?
|
val is constant and cannot be changed once assigned, while var is mutable, and you can change its value.
What is the difference between val and var in Scala?
|
42
Whats the total number of dots on a pair of dice?
|
The Kernel Mode
A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files before terminating the process. When a Ctrl-C input is given to this process, what is the mode in which the signal handling routine executes?
|
O(n^2)
What is the value of following recurrence.
T(n) = T(n/4) + T(n/2) + cn2 T(1) = c T(0) = 0 |
Record Pointers, Reference Pointers and Associate Pointers
What are the three types of pointers used in Pascal?
|
What is Tail Recursion?
Fill in the blanks: In _____, you perform your calculations first, and then you execute the recursive call, passing the results of your current step to the next recursive step
|
What is Avatar, The Last Airbender
Water. Earth. Fire. Air. Long ago, the four nations lived together in harmony. Then everything changed when the Fire Nation attacked.
|
when a program accesses a page not currently in memory
When does a page fault occur?
|
What is Breadth First Traversal
Given a directed graph where weight of every edge is same, we can efficiently find shortest path from a given source to destination using which traversal?
|