• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/118

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

118 Cards in this Set

  • Front
  • Back

We all know that a computer understands only computer language that is ___________.

Binary language (containing only 0s and 1s)

An _________ is an environment that is used to write computer programs, to compile them, to run them and to debug them

Integrated Development Environment (IDE)

The #include is a ____________ that tells the compiler to put code from the header called stdio.h into our program before actually creating the executable.

Preprocessor directive

Every full C program begins inside a function called __________.

main

___________ are used to indicate something to the person reading the code, or often used to explain sections of code.

Comments

There are two most commonly used syntaxes used for comments in C, the original ______ and the slightly newer _____.

/**/ and //

Large chunks of code can also be "commented out" using the preprocessor directives ________________.

#if 0 and #endif

A _________ is a set of alphabets, letters and some special characters that are valid in C language.

Character set

C accepts both ___________ and ____________ alphabets as variables and functions.

lowercase and uppercase

___________ are predefined, reserved words used in programming that have special meanings to the compiler.

Keywords

___________ refers to name given to entities such as variables, functions, structures etc._____________ must be unique. They are created to give a unique name to an entity to identify it during the execution of the program.

Identifiers

In programming, input and data are stored in ___________, is a container (storage area) to hold data.

Variable

_________ are data used for representing fixed values. They can be used directly in the code.

Literals

________ is a numeric literal(associated with numbers) without any fractional or exponential part.

Integer

______________ is a numeric literal that has either a fractional form or an exponent form

Floating-point literal

A ____________ is created by enclosing a single character inside single quotation marks.

Character literal

it is necessary to use characters that cannot be typed or has special meaning in C programming.

Escape sequence

A __________ is a sequence of characters enclosed in double-quote marks.

String literal

If you want to define a variable whose value cannot be changed, you can use the _________.

Constant keyword

__________ are declarations for variables. This determines the type and size of data associated with variables.

Data types

_________ are whole numbers that can have both zero, positive and negative values but no decimal values.


The size of _____ is usually 4 bytes (32 bits).

Integers

____ and _____ are used to hold real numbers.

Float and Double

floating-point numbers can also be represented in ____________ .

Exponential

_____ is an incomplete type. It means "nothing" or "no type". You can think of it as absent.

Void

________ and ________ are type modifiers. You can alter the data storage of a data type by using them.

Signed and Unsigned

Data types that are derived from fundamental data types are ________.


For example: arrays, pointers, function types, structures etc.

Derived types or derived data types.

____ are values or set of values.

Data

refers to single unit of values.

Data item

Data items that are divided into sub items are called as __________.

Group Items

Data items that cannot be divided are called as _________.

Elementary Items

An entity is that which contains certain attributes or properties, which may be assigned values.

Attribute and Entity

Entities of similar attributes form an _______.

Entity Set

__________ is a single elementary unit of information representing an attribute of an entity.

Field

________ is a collection of field values of a given entity.

Record

_____ is a collection of records of the entities in a given entity set.

File

_________ are the programmatic way of storing data so that data can be used efficiently.

Data Structures

The representation of a particular data structure in the memory of a computer is called a _______.

Storage structure

Abstract Data Structure are :

Linked List, Tree, Graph, Stack , Queue

These are the basic data structures and are directly operated upon by the machine instructions, which is in a primitive level.

Primitive data structures

It is a more sophisticated data structure emphasizing on structuring of a group of homogeneous (same type) or heterogeneous (different type) data items.

Non-primitive data structures

_____________ the data items are arranged in a linear sequence.

Linear data structures

_________ the data items are not in sequence. Example: Tree, Graph

Non-Linear data structures

_______________ all the elements are of same type. Example: Array

homogeneous data structures

the elements may or may not be of the same type.

Non-Homogeneous data structure

are those whose sizes and structures associated memory locations are fixed, at compile time. Example: Array

Static data structures

are those which expands or shrinks depending upon the program need and its execution.

Dynamic structures

is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output.

Algorithm

Algorithm to find an item in a data structure

Search

Algorithm to arrange items in a certain order.

Sort

Algorithm to put item in a data structure.

Insert

Algorithm to append an existing item in a data structure.

Update

Algorithm to remove an existing item from a data structure.

Delete

Each data structure has an ________. It represents the set of operations that a data structure supports.

Interface

__________ provides the internal representation of a data structure. It also provides the definition of the algorithms used in the operations of the data structure.

Implementation

Data structure implementation should implement its interface ________.

Correctly

the execution time of operations of data structure must be as small as possible.

Time Complexity

Memory usage of a data structure operation should be as little as possible.

Space Complexity

process of finding the desired information from the set of items stored in the form of elements in the computer memory

Data Search

______ although being very high, falls limited if the data grows to billion records.

Processor speed

As thousands of users can search data simultaneously on a web server, even the fast server fails while searching the data.

Multiple requests

This is the scenario where a particular data structure operation takes maximum time it can take. If an operation's _______ time is ƒ(n) then this operation will not take more than ƒ(n) time where ƒ(n) represents function of n.

Worst Case

This is the scenario depicting the average execution time of an operation of a data structure. If an operation takes ƒ(n) time in execution, then m operations will take mƒ(n) time.

Average Case

This is the scenario depicting the least possible execution time of an operation of a data structure. If an operation takes ƒ(n) time in execution, then the actual operation may take time as the random number which would be maximum as ƒ(n).

Best Case

What are the three execution time cases:

Worst case


Average case


Best case

is a finite set of unambiguous instructions that, given some set of initialconditions, can be performed in a prescribed sequence to achieve a certain goal and that has a recognizable set of end conditions.

Algorithm

That is to convert an informal algorithm to a program, we must go through several stages of formalization until we arrive at a program- whose meaning is formally defined by a programming language manual-is called __________ .

Stepwise refinement techniques

The development phase consists of two phases:

Design Phase


Coding Phase

_______the architecture, logic, and implementation details of the algorithm are envisioned and documented.


The _______ of an algorithm is an iterative process that involves comparing different candidate algorithms.

Design phase

The _______ and _____ phases of an algorithm are iterative in nature.

designing and coding

the designed algorithm is converted into a computer program.

Coding phase

The simplest way to specify the logic for an algorithm is to write the higher-level description of an algorithm in a semi-structured way, called _________ .

Pseudocode

an alternative approach is becoming popular, which is to represent the logic of the algorithm directly in the programming language in a somewhat simplified version. Like pseudocode, this selected code captures the important logic and structure of the proposed algorithm, avoiding detailed code. This selected code is sometimes called a _______.


void swap(int x, int y){int buffer = x;x = y;y = buffer;}

Snippet

_______ and ________ are not always enough to specify all the logic related to more complex distributed algorithms.

Pseudocode and snippets

_______ is a mathematical solution to a real-world problem.

Algorithm

__________ are designed to deal with a large amount of data.

Data-intensive algorithms

______ have considerable processing requirements but do not involve large amounts of data

Compute-intensive algorithms

To categorize the data dimension of the problem, we look at its (3Vs)

Volume, Velocity and Variety

_________ is about the processing and computing needs of the problem at hand. The processing requirements of an algorithm will determine what sort of design is most efficient for it.

Compute dimension

_________ is heavily procedural. The focus is entirely on writing code (functions). Data is passive in ___________.

Modular Programming

Two methods may be used for modular programming. They are known as

Top-down and bottom-up

_____ design dictates that a program should be divided into a main module and its related modules.

Top-down

It refers to a style of programming where an application is constructed starting with existing primitives of the programming language, and constructing gradually more and more complicated features, until the all of the application has been written.

Bottom-up algorithm design

is not programming with structures but by using following types of code structures to write programs:

Structured programming

It should be ______. An algorithm won't do you much good if it doesn't give you the right answers

correct

A good algorithm should be _______________. The best algorithm in the world won't do you any good if it's too complicated for you to implement on a computer

understandable

A good algorithm should be __________. Even if an algorithm produces a correct result, it won't help you much if it takes a thousand years or if it requires 1 billion terabytes of memory.

efficient

is the study of how complicated algorithms are.

Complexity theory

Estimates the runtime memory requirements needed to execute the algorithm.



estimates the amount of memory required by the algorithm to process input data.

Space complexity analysis

Estimates the time the algorithm will take to run.


estimates how long it will take for an algorithm to complete its assigned job based on its structure

Time complexity analysis

need to have efficient resource allocation mechanisms that are aware of the memory requirements at different execution phases of the algorithm.

Resilient Distributed Datasets (RDD)

Space needed to store the executable version of the program and it is fixed

Instruction space

Space needed to store all constants, variable values and has further two components:

Data space

This space is needed to store the information to resume the suspended (partially completed) functions.

Environment stack space

The amount of space needed by recursive function is called the __________.

recursion stack space

In this approach, different candidate algorithms are implemented and their performance is compared.

A post-implementation profiling approach

In this approach, the performance of each algorithm is approximated mathematically before running an algorithm.

A pre-implementation theoretical approach

The _________ of a typical algorithm will depend on the type of the data given to it as an input.

Performance

_________ are subjected to a sequence of instructions rather than one set of instruction.

Data structures

In many situations, data structures are subjected to a sequence of instructions rather than one set of instruction.

Amstrong

can be used to show that the average cost of an operation is small, if one averages over a sequence of operations, even though a simple operation might be expensive.

Amortized analysis

There may be more than one approach (or algorithm) to solve a problem. The best algorithm (or program) to solve a given problem is one that requires less space in memory and takes less time to complete its execution.

Time-Space Trade Off

is when an algorithm requires a maximum number of iterations or steps to search and find out the target value in the array

worst case f(n) = n

is when the number of steps is less as possible.

best case


f(n) = 1

falls between these two extremes (i.e., best and worst).

Average case


f(n) = n/2

It is said to run in _________________ If an algorithm takes the same amount of time to run, independent of the size of the input data.

constant time O(1)

It is represented by _______ If an algorithm takes the same amount of time to run, independent of the size of the input data

O(1)

An algorithm is said to have a complexity of __________ if the execution time is directly proportional to the size of the input.

linear time

It is represented by _____ if the execution time is directly proportional to the size of the input.

O(n)

An algorithm is said to run in _________ if the execution time of an algorithm is proportional to the square of the input size

quadratic time

It is represented by ______ if the execution time of an algorithm is proportional to the square of the input size.

O(n²)

An algorithm is said to run in ___________ if the execution time of the algorithm is proportional to the logarithm of the input size.

logarithmic time

It is represented by ______ if the execution time of the algorithm is proportional to the logarithm of the input size.

O(log n)

________ confirms that it is actually providing a mathematical solution to the problem we are trying to solve.

Validating an algorithm

a particular input always generates exactly the same output. But for certain classes of algorithms, a sequence of random numbers is also taken as input, which makes the output different each time the algorithm is run.

Deterministic algorithms

Algorithms can also be divided into the following two types based on assumptions or approximation used to simplify the logic to make them run faster:

An exact algorithm


•An approximate algorithm

are expected to produce a precise solution without introducing any assumptions or approximations.

Exact algorithms

When the problem complexity is too much to handle for the given resources, we simplify our problem by making some assumptions. The algorithms based on these simplifications or assumptions are called ____________, which doesn't quite give us the precise solution.

approximate algorithm

The ability to exactly identify the features that are used directly or indirectly to come up with a particular decision is called the _________ of an algorithm.

explainability