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
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 |
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 |
Why static variable is used in c?
Result of the following program is main() { int i=0; for(i=0;i<20;i++) { switch(i) case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf("%d,",i); } } a)0,5,9,13,17 b)5,9,13,17 c)12,17,22 d)16,21 e)syntax error
What are void pointers in c?
program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma
16 Answers Accenture, Infosys, TCS, Wipro,
What is meaning of tree
Why is extern used in c?
Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }
What are the types of pointers in c?
while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.
What are the preprocessors?
When should structures be passed by values or by references?