which of 'arrays' or 'pointers' are faster?
Answers were Sorted based on User's Feedback
array is faster than pointer because accessing array elements
by pointers always faster.there is used one array and more pointer.we know pointer is a "value at address".
so pointers stores only address of variable but arrays are stores similar data types.
| Is This Answer Correct ? | 10 Yes | 1 No |
Answer / andeep singh
Pointer is faster than array if there is only one pointer used
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / narendra
arrays are very faster because it stores a sequential
block of memory and similar data types
pointers stores only adders of variable
but arrays are stores similar data types
| Is This Answer Correct ? | 9 Yes | 4 No |
Answer / sandeep
when compared pointers work fast ,beacause:
1.array too is pointer
eg:char s[20];
gets(s);
here we are supplying base address.
2.array notation will be inter coverted as pointers
where we can directly use pointers.
| Is This Answer Correct ? | 0 Yes | 0 No |
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?
Explain low-order bytes.
write a C program to print the program itself ?!
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me
what does data structure mean?
how to write a bubble sort program without using temporary variable?
What is void c?
Blade logic interview question. 1st round is a written tests with 15 multiple questions from c and c++. All are simple basic question. Like int main () { Int i=65; Return printf(ā%cā, i); } 2nd and 3rd round is technical interview. The position for which I was interview was core UNIX and c. Yes it is for system programming. The company has product name blade server. For their server they are creating their own command for their purpose. Example cd command. We can implement it in a c program by using the chdir() function. So the question asks related to PID, fork, pipe, shared memory, signal. Write a program in c which will act as cp command.
1 Answers BladeLogic, Infosys,
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
Write a program that accept anumber in words
When should volatile modifier be used?