Class 10 Chapter 8 Solution SEBA Computer Science Solution
Looking for Class 10 Chapter 8 notes and solutions? You’ve come to the right place! Our website offers well-structured, easy-to-understand study materials that align perfectly with the latest CBSE syllabus. These notes are crafted by subject matter experts to provide clear explanations and step-by-step solutions to help you master even the most challenging topics. Whether you’re preparing for exams or need a quick revision, our resources ensure you’re always ready. Access our Class 10 Chapter 8 solutions now and take your learning to the next level!
Exercise
1. How is a pointer variable different from a normal variable?
2. Why is dynamic memory allocation an efficient memory management technique?
4. Write the output of the following code segment.
a.
int *ptr, x = 9;
ptr = &x;
printf(“\n %d”, (*ptr)++);
b.
int *ptr, x = 9;
ptr = &x;
printf(“\n %d”, (*ptr)++);
printf(“\n %d”, *ptr);
c.
int *ptr, x = 9;
ptr = &x;
int y = ++(*ptr);
printf(“\n %d”, y);
d.
char *ptr, x = ‘A’;
ptr = &x;
char y = *ptr;
printf(“\n %c”, y);
e.
char *ptr, x = ‘A’;
ptr = &x;
char y = (*ptr)++;
printf(“\n %c”, y);
f.
char *ptr, x = ‘A’;
ptr = &x;
char y = ++(*ptr);
printf(“\n %c”, y);
g.
char *ptr, x = ‘A’;
ptr = &x;
char *y;
y = ptr;
printf( “\n %c”, ++(*y) );
8. Write a C program to store some integer variables in an array. Then write functions to the following.
a. To calculate the number of even numbers in the array.
b. To dynamically allocate memory to a new array to store only the even numbers.
c. To copy the even numbers from the first array to the second one.
9. Write a C program to store some integer variables in an array. Then write functions to
the following.
a. To calculate the number of even numbers in the array.
b. To dynamically allocate memory to a new array to store only the even numbers.
c. To copy the even numbers from the first array to the second one