C Programming and Technical

output?
Q. What are segment and offset addresses?

A. When paging technique is performed, the page will breaks into segments and its sequence is said to be segments and its width can be said as offset. In short,segment is a physical address and offset is logical address

Read Solution (Total 0)

C Other Question

output?
Q. What is the difference between ordinary variable and pointer in C?

A. An ordinary variable is like a container it can hold any value and we can change the value of ordinary variable at a time throughout the program .A pointer is a variable that stores the address of another Variable.
Q. When should a type cast be used?

A. There are two situations in which to use a type cast. The first use is to change the type of an operand to an arithmetic operation so that the operation will be performed properly. The second case is to cast pointer types to and from void * in order to interface with functions
that expect or return void pointers. For example, the following line type casts the return value of the call to malloc() to be a pointer to a foo structure. struct foo *p = (struct foo *) malloc(sizeof(struct foo));