Programming Flashcards

1
Q

What are the advantages of using pointer?

A

*makes program simple
*reduces program length
*enhances execution speed
*helps in allocation and deallocation.

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

What are string handling functions? Explain any 4

A

built-in functions in programming languages that manipulate and process strings.
*strcpy() : It can copy the content of one string to another
*strcat() : It is used to join two strings
*strcmp() : can compared to strings
*strlwr() : can convert the string to lowercase

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

Classify the different types of decision making statements.

A

There are two types of decision making statements
*if statement: helps u execute a block of code if the condition is true
*if-else statement: helps u to execute the block of code if the condition is true and another block of code if the condition is false.
*nested if statement: it is an if statement inside an if statement.
*switch statement: allows u to select one of many code blocks based on the value of the variable.

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

What are multidimensional array

A

arrays with more than one dimension, used for tables and mattresses

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

Define array

A

An array is a data structure that allows you to store multiple values of Same data type in contiguous block of memory
syntax
data_type array_name [size]
initialization int arr[5]={1,2,3,4,5};

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

Define Union

A

user defined data type that allows different variables to be stored in the same memory location.

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

Difference between arrays and pointers

A

ARRAYS
*An array is a data structure that allows you to store multiple values of Same data type in contiguous block of memory
*They cannot be modified
*initialisation is done while defining them
*nature is statistic
*allocation is done at compile time
POINTER
*Variables that store memory address
*they cannot be initialised while defining them
*nature is dynamite
*allocation is done at the runtime

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

Difference between arrays and pointers

A

ARRAYS
*An array is a data structure that allows you to store multiple values of Same data type in contiguous block of memory
*They cannot be modified
*initialisation is done while defining them
*nature is statistic
*allocation is done at compile time
POINTER
*Variables that store memory address
*they cannot be initialised while defining them
*nature is dynamite
*allocation is done at the runtime

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