Wild Pointer in C

 #include<stdio.h>

#include<conio.h>
#include<stdlib.h>

int main()
{
    int a = 334;
    int *ptr;//This is a wild pointer
    // *ptr = 34;//This is not a good thing to do
    ptr = &a;//ptr is no longer a wild pointer
    printf("The value of a is %d\n", *ptr);
    return 0;
}

Comments

Popular posts from this blog

C Program using continue statement

C program of WHILE Loop

NULL Pointer in C.

C Program using DO WHILE loop

C Program using SWITCH statement

New Animated Login or signup page made by HTML, CSS and JavaScript.

C Program to print multiplication table of any number.

C Language Travel Agency Manager Exercise.

STRUCTURE IN C PROGRAMMING.