memory model

a(2)How many pointers are in turbo C?
Ans:
3
1. Near pointer (16 bit)
2. Far pointer (32 bit)
3. Huge pointer (32 bit)
(3) How many memory models?
Ans:

According to size of program in code area,data area and stack area there are six type of memory model:1. Tiny
2. Small (default)
3. Medium
4. Compact
5. Large
6. Huge

Note: - to change memory model (in turbo c) go to

Option->compiler->code generation.(1) What will output :
Void main()
{
int * p,b;
b=sizeof(p);
printf(“%d”,b);
}
Ans:Output: 2 or 4
Explanation:Since in this question it has not written p is which type pointer.So it’s output will depends upon which memory model has selected. Default memory model is small.
Memory model...............................................default pointer size
Tiny, Small (default), Medium near...................................2
Compact,Large,Huge far......................................................4

What is pointer ?

memory model

near pointer

far pointer

Physical address calculation

huge pointer

How will we read complex pointer ?

MEMORY MANAGEMENT memory cell,Residence memory segmentation offset address data segment ,stack,data,heap,code area STRCTURE AND UNION What is strcture We cannot assign diffrent type structure to other ... Initialization of structure member variable Why we cannot use relation and logical operators i... Bit level programming: pointer in bit level programming Important point for bit level programming Misuse of pointer in structure: arrary,union,structure in the structure ADVANCE C System Level programming. Write the c program to switch the 256 color graphi... Project in c Command line argument in c How to create dos command in c? Create dir command in c How to create virus in c? Write c program which shutdown the window operat... Write a c which delete the all the .exe file of in... Mouse programming in c DATA TYPE data type and qualifier size of data type,const and volatile memory map of char endianness memory map of int memory map of float,double cyclic nature of data type enum ,typedef Constant in c good question FUNCTION Syntax of function in c How to make user defined function as library funct... Function in c with no parameter and not returning ... Function in c has parameter but not returning any ... Function in c with parameter and returning a value... What is Ellipsis or … in c ? What is main function in c? Parameter passing convention in c :pascal and cdec... Function recursion in c PREPROCESSOR Preprocessor directives #define #include #,## #pragma #pragma inline #pragma warn #pragma startup, #pragma exit #error, #line





No comments: