World Languages, asked by dainvincible1, 1 year ago

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

#include
int main()
{
char *s1;
char far *s2;
char huge *s3;
printf("%d, %d, %d\n", sizeof(s1), sizeof(s2), sizeof(s3));
return 0;
}

Answers

Answered by Anonymous
0
Input:-
#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;
}

Solution:-

char *s1 = 2 bytes.
char far *s2; = 4 bytes.
char huge *s3; = 4 bytes.

Hence,output is 2,4,4.
Answered by Anonymous
0
THE INPUT IS

#include
int main()
{
char *s1;
char far *s2;
char huge *s3;
printf("%d, %d, %d\n", sizeof(s1), sizeof(s2), sizeof(s3));
return 0;
}

THE OUTPUT WILL BE:
2, 4, 4

Since C is a compiler  language, it may give different output in other COMPUTER LANGUAGE . The above program works good  in Windows (TurboC)
Similar questions