adplus-dvertising
frame-decoration

Question

What is the output of the program in Turbo C (in DOS 16-bit OS)?
#include<stdio.h>
int main()
{
    char *s1;
    char far *s2;
    char huge *s3;
    printf("%d, %d, %d\n", sizeof(s1), sizeof(s2), sizeof(s3));
    return 0;
}

a.

2, 4, 6

b.

4, 4, 2

c.

2, 4, 4

d.

2, 2, 2

Posted under C Programming

Answer: (c).2, 4, 4

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the program in Turbo C (in DOS 16-bit OS)?

Similar Questions

Discover Related MCQs

Q. Which of the following is correct about err used in the declaration given below?
typedef enum error { warning, test, exception } err;

Q. Which of the structure is incorrcet?

1 :
struct aa
{
int a;
float b;
};

2 :
struct aa
{
int a;
float b;
struct aa var;
};

3 :
struct aa
{
int a;
float b;
struct aa *var;
};

Q. Which of the structure is correct?


1 :
struct book
{
char name[10];
float price;
int pages;
};


2 :
struct aa
{
char name[10];
float price;
int pages;
}


3 :
struct aa
{
char name[10];
float price;
int pages;
}

Q. 1 :
typedef long a;extern int a c;

2 :
typedef long a;extern a int c;

3 :
typedef long a;extern a c;

Q. Which of the following is the correct order of evaluation for the below expression?z = x + y * z / 4 % 2 - 1

Q. Which of the following is the correct order if calling functions in the below code?
a = f1(23, 14) * f2(12/4) + f3();

Q. Which of the following are unary operators in C?

1. !
2. sizeof
3. ~
4. &&

Q. In which order do the following gets evaluated

1. Relational
2. Arithmetic
3. Logical
4. Assignment

Q. In which numbering system can the binary number 1011011111000101 be easily converted to?

Q. Which bitwise operator is suitable for turning off a particular bit in a number?

Q. Which bitwise operator is suitable for turning on a particular bit in a number?

Q. Which bitwise operator is suitable for checking whether a particular bit is on or off?

Q. What are the different types of real data type in C ?

Q. What will you do to treat the constant 3.14 as a long double?

Q. Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ?

Q. We want to round off x, a float, to an int value, The correct way to do is

Q. The binary equivalent of 5.375 is

Q. A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?

Q. What will you do to treat the constant 3.14 as a float?

Q. Which of the following statement obtains the remainder on dividing 5.5 by 1.3 ?