why in C,C++'s int size is 2 byte and .net(c#) int Size is 4
byte?

Answers were Sorted based on User's Feedback



why in C,C++'s int size is 2 byte and .net(c#) int Size is 4 byte?..

Answer / mohit

because c and c++ language use ASCII code system.but in .net
and java use UNICODE system. where char size also 2byte.

Is This Answer Correct ?    14 Yes 0 No

why in C,C++'s int size is 2 byte and .net(c#) int Size is 4 byte?..

Answer / king

according to me, c,c++ is the base of pop and oop all language. any person learn any language in deep then his/her base language is clear. so the c and c++ language is most used clear to base logic of all people.so it's int type occupies 2 byte only whereas .net language is used enterprize level and professional level to make application,this language is not used to clear base logic but used to make enterprize and web based application,in web based or professional application numeric variable requirement wide range,in this place 2 byte is less to used in application so the increased size of int in .net language to used wide range of size to make perfect enterprize application and standlone application..(eg. viza card,credit card,ATM card,passport,etc's number is very long)

Is This Answer Correct ?    6 Yes 6 No

Post New Answer

More C Interview Questions

what is the difference between definition and declaration? give me some examples.

2 Answers   TCS,


44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?

6 Answers   Amdocs,


What is the role of && operator in a program code?

0 Answers  


Explain the difference between ++u and u++?

0 Answers  


Is c is a high level language?

0 Answers  


Should a function contain a return statement if it does not return a value?

0 Answers  


What are pointers? What are different types of pointers?

0 Answers   Fidelity,


Why is c so popular?

0 Answers  


what will be the output for the following main() { printf("hi" "hello"); }

5 Answers   RoboSoft,


What is character constants?

0 Answers  


int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]

6 Answers   Hughes,


what is the coding of display the factorial of a number using array and function?

1 Answers  


Categories