Programming languages

Programming languages

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

Malloc is a form of explicit dynamic memory allocation.

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (48)

Section 1

(48 cards)

Malloc is a form of explicit dynamic memory allocation.

Front

True

Back

In Java, an int is 2 bytes.

Front

False, it is 4 bytes

Back

In logical languages, the program only specifies what is needed.

Front

True

Back

Homogeneous arrays store the same data type for all elements.

Front

True

Back

What are associative arrays called in Java?

Front

hashmaps

Back

Which storage are function variables classified in? Automatic, Static, or Heap?

Front

Automatic memory / Stack

Back

Java objects are pass by reference.

Front

False, they are pass by object reference

Back

Object oriented

Front

C++, Python, Java

Back

Multidimensional Arrays are contiguous in memory.

Front

True

Back

Global variables are ignored in Dynamic scope if a local variable of the same name is used in a function.

Front

True

Back

Which scoping does C use?

Front

Static

Back

Call by reference

Front

pass by address using & - can change the original value of a variable

Back

Dynamic

Front

Variables can be declared in one function and the scope of that variable is in all other functions called after.

Back

If you are developing AI, which language would you pick?

Front

LISP (Python if we are talking currently. Lisp was the first AI language)

Back

What are associative arrays used as in Python?

Front

Dictionaries

Back

PS

Front

runs on .net/ OO language

Back

Structural

Front

Java, C#, Python

Back

Functional

Front

LISP, Haskell??

Back

Python

Front

Case sensative/uses call by value

Back

Procedural

Front

C, COBOL, PL/I, Python

Back

What is a disadvantage of C strings?

Front

Calculating the string length takes a time complexity of the size of the string. It is very slow

Back

What is the formula to find an element in a multidimensional array?

Front

c * i + j where c is the size of each element, i is the row, and j is the column

Back

Static

Front

Scoped within a function, order of function calls does not affect scope.

Back

Pointers declared locally are stored in _________ memory.

Front

Automatic / Stack

Back

Call by name

Front

supported by ALGOL language - what you pass in is the actual value!

Back

Lisp

Front

defun uses call by value/ defmacro uses call by name

Back

Java primitives are pass by _______.

Front

value

Back

Node.js

Front

server side javascript uses ajax calls

Back

Automatic/Stack memory

Front

function parameters, local variables

Back

If you have many scientific calculations to do, what language would you pick?

Front

C

Back

An actual string in Java is immutable. Why?

Front

So it cannot be altered. This reduces errors and increases safety.

Back

Lisp uses mostly linked lists and recursion.

Front

True

Back

A pointer can point to all three forms of memory.

Front

True

Back

Little endian stores the least significant digit last.

Front

False

Back

Logical

Front

SQL, Prolog

Back

Name the 5 data characteristics.

Front

Structures, Size, Data Type, Location, and Value

Back

Static Memory

Front

Static variables, global variables, code

Back

What is a disadvantage to declaring strings in COBOL?

Front

Fixed length

Back

Global variables are stored in ______ memory.

Front

Static

Back

Imperative

Front

Fortran, Assembler

Back

Pass by reference requires the address of variables.

Front

True

Back

SQL is a logical language.

Front

True

Back

Does Lisp use both static and dynamic scoping?

Front

Yes

Back

Call by value

Front

original value cannot be changed by the function that is called

Back

Which syntax notation do most languages use? Infix, postfix, or prefix?

Front

Infix

Back

Heap memory

Front

allocated memory using malloc

Back

What language is good for business applications?

Front

COBOL

Back

What is the time complexity of calculating the string length in COBOL?

Front

O(1) - Constant

Back