why to assign a pointer to null sometimes??how can a pointer
we declare get assigned with a garbage value by default???
Answer / Kavita Ranjhia
In C programming, pointers are used to store memory addresses. Assigning a pointer to NULL ensures that it does not point to any valid memory location. This is important for preventing undefined behavior or accessing invalid memory. By default, when you declare a pointer but do not initialize it, it may contain garbage values (i.e., random and unpredictable memory addresses).
| Is This Answer Correct ? | 0 Yes | 0 No |
int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Explain the difference between struct and union.
write a progrmm in c language take user interface generate table using for loop?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?
Write a program to find given number is even or odd without using any control statement.
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
How do I swap bytes?
Given an array of numbers, except for one number all the others occur twice. Give an algorithm to find that number which occurs only once in the array.
find out largest elemant of diagonalmatrix
second highest number in a given set of numbers
how we do lcm of two no using c simple if while or for statement