Coding Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

\the process of allocating memory at runtime, rather than at compile time. You can use the malloc and calloc functions to dynamically allocate memory for one-dimensional arrays, and the realloc function to change the size of a dynamically allocated array. You should use the free function to release dynamically allocated memory when you are finished with it.

A

Dynamic memory allocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

a special value that indicates the end of a file or an error in file input/output operations. When the fscanf or fgets functions reach the end of a file, they return the EOF flag. You can use the feof function to check for the EOF flag, and the ferror function to check for errors in file operations.

A

EOF flag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

a control statement in C that causes the loop to terminate immediately and transfer control to the next statement after the loop. For example: “for (int i = 0; i < 10; i++) { if (i == 5) break; … }” terminates the loop when i reaches 5.

A

“break” statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

a control statement in C that causes the loop to skip the rest of its body and continue with the next iteration. For example: “for (int i = 0; i < 10; i++) { if (i % 2 == 0) continue; … }” skips the even values of i.

A

“continue” statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

a special value that indicates the end of a file or an error in file input/output operations. When the fopen function fails to open a file, it returns a NULL pointer. When the fscanf or fgets functions reach the end of a file, they return the EOF (end-of-file) flag.

A

NULL file address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

a variable that stores the address of a FILE object, which represents a stream (i.e., a sequence of bytes) associated with a file or other input/output device. You can use the fopen function to open a file and get a pointer to a FILE object, and the fclose function to close the file and release the pointer.

A

Pointer variable of the FILE type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In C, the & operator is used to get the address of a variable, and the * operator is used to access the value

A

Pointer operators (&, *) and their functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In C, variables can be classified as local, static, or global based on their scope. A local variable is a variable that is declared within a function and is only visible within that function. A static variable is a variable that is declared within a function and retains its value between function calls. A global variable is a variable that is declared outside of any function and is visible to all functions in the program.

A

Local, static, global variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

are used to read data from and write data to files or other devices. In C, you can use the fopen, scanf, fscanf, printf, and fprintf functions to perform I/O operations. The fopen function is used to open a file, the scanf and fscanf functions are used to read data from the standard input or a file, the printf and fprintf functions are used to write data to the standard output or a file.

A

I/O statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

are used to make decisions based on the value of a condition. In C, you can use the if statement and the switch statement to make decisions. The if statement has a condition and a block of code to be executed if the condition is true. The switch statement has a variable and a list of cases, with each case representing a different value of the variable.

A

Decision statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

are used to execute a block of code repeatedly. In C, there are two types of looping statements: for loops and while loops. A for loop has a loop control variable, a starting value, an ending value, and a step. A while loop has a condition that is checked before each iteration.

A

Looping statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

a collection of variables of the same type, stored in contiguous memory locations. To declare an array in C, you need to specify its name, type, and size. To access an element of an array, you can use its index.

A

Arrays

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

An arithmetic expression is a combination of variables, constants, and operators that represents a computation. In C, you can use the usual arithmetic operators (+, -, *, /, %) to perform arithmetic calculations.

A

Arithmetic expressions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

you need to declare it before calling it. A function declaration tells the compiler about the function’s name, return type, and parameters.

A

Function declaration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

a block of code that performs a specific task. In C, you can define your own functions or use functions from libraries. To define a function, you need to specify its name, return type, and the types and names of its parameters.

A

Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

which are numbers that do not have a decimal point. In C, you can perform basic arithmetic operations such as addition, subtraction, multiplication, and division on integers.

A

Integer arithmetic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

used to store data. A variable has a name, a type, and a value. There are several types of variables in C, including integers, floating-point numbers, characters, and arrays. To declare a variable in C, you need to specify its name and type.

A

Types and declaration of variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

used to measure the similarity between two signals. There are three main types of correlation: auto-correlation, cross-correlation, and partial correlation. Auto-correlation measures the similarity between a signal and a delayed version of itself. Cross-correlation measures the similarity between two different signals. Partial correlation measures the similarity between two signals while controlling for the influence of one or more other signals. The correlation functions are typically plotted as a function of the delay between the two signals being correlated. The shape and location of the correlation function can provide information about the relationship between the two signals.

A

Correlation Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

There is a difference in resolution between analog, discrete, and digital signals. Analog signals have continuous amplitude and time resolution, while discrete signals have quantized amplitude and time resolution. Digital signals have further quantized amplitude and time resolution, and are represented by a sequence of digital values.

A

Resolution of Analog, Discrete, and Digital Signals

20
Q

The first and second derivatives of a signal represent the rate of change and the acceleration of the signal, respectively. These derivatives can provide information about the shape and characteristics of the signal.

A

First and Second Derivatives of a Signal

21
Q

ECG (electrocardiogram) and EEG (electroencephalogram) signals are used to measure the electrical activity of the heart and brain, respectively. An ECG signal consists of several waves that reflect different aspects of the cardiac cycle, including the P wave, QRS complex, and T wave. A lead refers to a specific orientation of the electrodes used to measure the ECG signal.

A

ECG and EEG Signals

22
Q

Time-domain event detection algorithms are used to analyze signals in order to detect specific events or patterns. These algorithms are used in a variety of applications, including medical monitoring, speech recognition, and control systems.

A

Time-Domain Event Detection Algorithms

23
Q

The Nyquist criterion states that, in order to accurately represent a signal in the frequency domain, the sampling rate must be at least twice the highest frequency in the signal. If the sampling rate is not high enough, frequencies above the Nyquist frequency will be “aliased” down to frequencies below the Nyquist frequency, resulting in an error in the frequency domain representation of the signal. This error is known as aliasing error.

A

Nyquist Criterion and Aliasing Error

24
Q

The resolution of the amplitude frequency spectrum of a digital signal is determined by the number of samples in the signal. The more samples you have, the finer the resolution will be. However, increasing the number of samples can also increase the computational complexity of the analysis.

A

Resolution of Amplitude Frequency Spectrum for Digital Signal

25
Q

The frequency range and resolution of the amplitude frequency spectrum of a signal depend on the sampling rate of the signal. For analog signals, the frequency range is typically from 0 Hz (DC) to half the sampling rate (the Nyquist frequency). For discrete signals, the frequency range is typically from 0 Hz to the Nyquist frequency, and the resolution is determined by the number of samples in the signal.

A

Frequency Range and Resolution of Amplitude Frequency Spectrum

26
Q

The frequency content of a signal refers to the distribution of energy across different frequencies in the signal. For analog signals, the frequency content can vary continuously over a wide range. For discrete signals, the frequency content is typically quantized into a finite number of frequency bins.

A

Signal Frequency Content

27
Q

There are several types of Fourier analysis that can be used to study signals in the frequency domain, including the Fourier transform, the discrete Fourier transform (DFT), and the fast Fourier transform (FFT). These techniques allow you to represent a signal as a sum of sinusoidal components, each with a specific frequency, amplitude, and phase.

A

Types of Fourier Analysis

28
Q

Frequency domain analysis is a technique used to study the frequency content of signals. It is used in many fields to understand the behavior of systems and to design filters and other processing techniques.

A

Frequency Domain Analysis

29
Q

The output of an LTI system is obtained by convolving the impulse response function of the system with the input signal. Convolution is a mathematical operation that involves taking the dot product of the impulse response function and the input signal at each time step, and then summing the results. The output of the convolution is the output of the system for the given input signal.

A

Output of an LTI System

30
Q

The impulse response function (h[n]) of an LTI system describes the output of the system when the input is a brief, isolated pulse. It can be determined by applying an impulse function to the system and measuring the output.

A

Impulse Response Function

31
Q

The impulse function is a mathematical function that is used to represent a brief, isolated pulse. In the time domain, the impulse function has a value of zero everywhere except at a single time point, where it has a value of one. In the frequency domain, the impulse function has a constant magnitude and phase across all frequencies.

A

Impulse Function

32
Q

LTI systems have two key properties: superposition and time-invariance (or shift-invariance). Superposition means that the output of the system can be obtained by adding together the outputs of the system for each individual input. Time-invariance means that the output of the system does not depend on the timing of the input.

A

Properties of LTI Systems

33
Q

Linear, time-invariant (LTI) systems are a type of system that exhibits certain mathematical properties, including superposition and time-invariance. They are used to model a wide range of phenomena in fields such as engineering, physics, and economics.

A

LTI Systems

34
Q

The filter cutoff frequency is the frequency at which the filter begins to significantly attenuate (reduce) the signal. It can be determined by examining the values of the coefficients in the filter’s input-output equation, or by examining the frequency response of the filter.

A

Filter Cutoff Frequency

35
Q

The frequency response function of a digital filter describes the output of the filter for different input frequencies.

A

Frequency Response Function

36
Q

The impulse response function of a digital filter describes the output of the filter when the input is a brief, isolated pulse.

A

Impulse Response Function

37
Q

Linear phase filters are a type of filter that have a constant delay across all frequencies. This can be desirable because it avoids introducing phase distortion to the signal.

A

Linear Phase Filters

38
Q

Filter stability refers to a filter’s ability to produce a bounded output for any input signal. An unstable filter can produce large, unexpected output values, which can cause problems in systems that rely on the filter’s output.

A

Filter Stability

39
Q

FIR (Finite Impulse Response) filters have a finite impulse response and generally require more coefficients to achieve a desired frequency response. IIR (Infinite Impulse Response) filters have an infinite impulse response and can achieve a given frequency response with fewer coefficients, but may be more sensitive to round-off error and more difficult to design and implement.

A

FIR and IIR Filters

40
Q

Digital filters used to process one-dimensional signals, such as audio or image data. They can be used to remove noise, smooth data, or extract specific features from the signal.

A

1-D Digital Filters

41
Q

A technique used to convert a grayscale or color image into a binary image, where each pixel is assigned a value of 0 or 1 based on whether its intensity or color value is greater than or less than a specified threshold value. This can be useful for image segmentation, feature extraction, or noise reduction.

A

Image thresholding

42
Q

Types of 2-D filters that are used to selectively filter out low or high spatial frequencies in an image. Low-pass filters allow low spatial frequencies to pass through and attenuate high spatial frequencies, while high-pass filters attenuate low spatial frequencies and allow high spatial frequencies to pass through.

A

Low-pass and high-pass 2-D filter kernels

43
Q

Related concepts used to describe the periodic behavior of signals or images, with spatial frequency referring to the number of cycles or repetitions of a pattern in a given distance in an image, and temporal frequency referring to the number of cycles or repetitions of a pattern over time in a signal.

A

Spatial vs. temporal frequency

44
Q

The output of a 2-D digital filter when applied to a 2-D impulse function as input.

A

2-D impulse response function (kernel)

45
Q

A mathematical function that has a value of 1 at the origin and 0 everywhere else, and can be used as a building block for 2-D digital filters.

A

2-D impulse function

46
Q

The level of detail and clarity in an image, typically quantified in terms of the number of pixels (spatial resolution) and the number of levels of intensity or color (intensity resolution) that make up the image.

A

Image resolution:

47
Q

Mathematical algorithms used to manipulate or analyze images by processing the values of individual pixels or groups of pixels in two-dimensional arrays.

A

2-D digital filters