AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?
Answers were Sorted based on User's Feedback
Answer / jaya prakash
Register.
Since the register variable is stored in CPU.
Easy to retrive and modify it.
Is This Answer Correct ? | 11 Yes | 0 No |
Register.
Since the register variable is stored in CPU.
try once applying a programme:--
and check it it's execution time Using..
time ./a.out
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / dave
register storage class is faster.coz register accessing is
faster than main memory for the processor.for ide like
turbo,borland etc. there was a limitation in register usage.
but now for gcc and gnu ides there are millions of registers
to access.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / biju
Ofcourse register storage class is for quick access
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / rahul
register
becoz accessing value from register is more faster than
memory becoz it is in CPU.
if register is free otherwise it would become a local var.
Is This Answer Correct ? | 2 Yes | 2 No |
What is sizeof c?
Can we declare function inside main?
What is the difference between a string and an array?
write a program to rearrange the array such way that all even elements should come first and next come odd
How is a structure member accessed?
What is context in c?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CHOUDHARY" }; printf("\nstring1=%s",str[0]); printf("\nstring2=%s",str[1]); printf("\nstring3=%s",str[2]); a)string1=Manish string2=Kumar string3=Choudhary b)string1=Manish string2=Manish string3=Manish c)string1=Manish Kumar Choudhary string2=(null) string3=(null) d)Compiler error
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?
What is substring in c?
what is the difference between char * const and const char *?
What is action and transformation in spark?