Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
Pointers
What will be the output of the program? #include<stdio.h> int main() { int i, a[] = {2, 4, 6, 8, 10}; change(a, 5); for(i=0; i<=4; i++) printf("%d, ", a[i]); return 0; } void change(int *b, int n) { int i; for(i=0; i<n; i++) *(b+1) = *(b+i)+5; }
7, 9, 11, 13, 15
2, 15, 6, 8, 10
2 4 6 8 10
3, 1, -1, -3, -5
Show Answer
Correct Answer:
2, 15, 6, 8, 10
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment