what will happen if you free a pointer twice after
allocating memory dynamically ?
Answers were Sorted based on User's Feedback
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
Program to find largest of three numbers without using comparsion operator?
why we are using semicolon at the end of printh statment
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
What is volatile c?
Go through this linked list concept.While traversing through the singly linked list sometimes the following code snippet "while(head != NULL)" is used and other times "while(head->link != NULL)"is used(Here head is the pointer pointing to the first node,node has two parts data part and link part).What is the difference between head != NULL and Head->link != NULL and in which situation are they used?
mplementation of stack using any programing language
What is the advantage of an array over individual variables?
Write a program to check palindrome number in c programming?
What is an auto keyword in c?
Consider the following C program. #include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain
What is the most efficient way to count the number of bits which are set in an integer?