Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A:A pointer is a variable whose value is the address of another variable, i.e., direct address of the
memory location. Like any variable or constant, you must declare a pointer before using it to
store any variable address.
A:If a pointer still references the original memory after it has been freed, it is called a dangling
pointer. The pointer does not point to a valid object. This is sometimes referred to as a
premature free.
A:A data type, in programming, is a classification that specifies which type of value a variable has
and what type of mathematical, relational or logical operations can be applied to it without
causing an error.
In C, the library function malloc is used to allocate a block of memory on the heap. The program
accesses this block of memory via a pointer that malloc returns. When the memory is no longer
needed, the pointer is passed to free which deallocates the memory so that it can be used for
other purposes.
A:
14.What is a string?
A:A string is a data type used in programming, such as an integer and floating point unit, but is
used to represent text rather than numbers. It is comprised of a set of characters that can also
contain spaces and numbers.
15./0 in string?
A:The null character '\0' (also null terminator ), abbreviated NUL , is a control character with the
value zero.
16.What is recursion?
17.What is printf?
A: Printf is a pre defined function which is defined by header file stdio.h basically Printf is used to
print the value of any variable.
18.What is math.h?
A:The math.h header defines various mathematical functions and one macro. All the functions
available in this library take double as an argument and return double as the result.
A:A function in C can be called either with arguments or without arguments. These function may
or may not return values to the calling functions. All C functions can be called either with
arguments or without arguments in a C program. Also, they may or may not return any values.
A:Relational operators are used to compare values of two expression. Relational operators are
binary operators because they require two operands to operate. An expression which contains
the relational operators is called relational expression.
A:An expression containing logical operator returns either 0 or 1 depending upon whether
expression results true or false. Logical operators are commonly used in decision making in C
programming.
A:A bitwise operator is an operator used to perform bitwise operations on bit patterns or binary
numerals that involve the manipulation of individual bits.
A:In decision control statements (if-else and nested if), group of statements are executed when
condition is true. If condition is false, then else part statements are executed. There are 3 types
of decision making control statements in C language.
A:With loop control statements, you can repeatedly execute a block of code. There are two types
of loops: for statements loop a specific number of times, and keep track of each iteration with an
incrementing index variable. while statements loop as long as a condition remains true.
A:In C, do...while loop is very similar to while loop. Only difference between these two loops is
that, in while loops, test expression is checked at first but, in do...while loop code is executed at
first then the condition is checked. So, the code are executed at least once in do...while loops.
27.What is the difference between single equal “=” and double equal “==” operators in C?
A:Single equal is an assignment operator used to assign the values to the variables. But, double
equal is relational operator used to compare two variable values whether they are equal are not.
28.What is the difference between pre increment operator and post increment operator?
A:In C, expressions have values and side effects. For pre- and post- increment, the side effect is
the same - the variable is incremented. But they differ in value. With pre-increment, the value of
the expression is before the increment, and with post-increment, it's after.
29.What is the difference between pre decrement operator and post decrement operator?
A:Pre decrement operator is used to decrement variable value by 1 before assigning the value to
the variable. Post decrement operator is used to decrement variable value by 1 after assigning
the value to the variable.
A:&-Binary AND Operator copies a bit to the result if it exists in both operands.
*-Pointer to a variable.