CoolInterview.com - World's Largest Collection of Interview Questions
 Interview Questions  
 Our Services  

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!


    Send your Resume to 6000 Companies


  • INTERVIEW QUESTIONS LANGUAGES C DETAILS
    Question :
    What is a null pointer?



    Category C Interview Questions
    Rating (0.0) By 0 users
    Added on 7/19/2006
    Views 2318
    Rate it!
    Answers:

    Null pointer: When referring to computer memory, a null pointer is a command used to direct a software program or operating system to an empty location in the computer memory. Commonly, the null pointer is used to denote the end of a memory search or processing event. In computer programming, a null pointer is a pointer that does not point to any object or function.

    In the programming language c, NULL is an available command that can be used.



    to find the amstrong number it is better to check a condition. following a pgrm:

    #include<stdio.h>
    #include<conio.h>

    void main()
    {
    int n,r,x,s=0;
    clrscr();

    printf("enter the number:");
    scanf("%d",&n);

    x=n;
    while(n>0)
    {
    r=n%10;
    n=n/10;
    s=s+(r*r*r);
    }

    if(x==s)

    printf("%dis a amstrong number",s);
    else
    printf("%d is not a amstrong number",s);
    getch();
    }



     Posted by: siju    

    Contact siju  Contact siju

    a null pointer never points to any variable



     Posted by: siju    

    Contact siju  Contact siju

    to find the amstrong number it is better to check a condition. following a pgrm:

    #include<stdio.h>
    #include<conio.h>

    void main()
    {
    int n,r,x,s=0;
    clrscr();

    printf("enter the number:");
    scanf("%d",&n);

    x=n;
    while(n>0)
    {
    r=n%10;
    n=n/10;
    s=s+(r*r*r);
    }

    if(x==s)

    printf("%dis a amstrong number",s);
    else
    printf("%d is not a amstrong number",s);
    getch();
    }



     Posted by: siju    

    Contact siju  Contact siju

    The NULL pointer points to a place in memory that cannot be accessed. NULL is useful when checking for error conditions and many functions return NULL if they fail.



     Posted by: parvati    

    Contact parvati  Contact parvati

    pointer is a variable which contains the addresses of another variable.
    if at all we just declare the pointer variable but not define the value then the default value of that pointer is 'null'.
    it is called "null pointer"{.



     Posted by: sreelatha    

    Contact sreelatha  Contact sreelatha


    If you have the better answer, then send it to us. We will display your answer after the approval.
    Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    How can I convert a number to a string?


    View Answer
    What is the difference between #include <file> and #include ?file??


    View Answer
    What is Preprocessor?


    View Answer
    What is the difference between text and binary modes?


    View Answer
    What is the benefit of using const for declaring constants?


    View Answer
    What is the difference between declaring a variable and defining a variable?


    View Answer
    What is a const pointer?
    View Answer
    What is an lvalue?


    View Answer
    When is a switch statement better than multiple if statements?


    View Answer
    Can static variables be declared in a header file?


    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:

    View ALL C Interview Questions

    User Options
    Sponsored Links


    Copyright ©2003-2009 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions
    Page URL: http://www.coolinterview.com/interview/6064/default.asp?cachecommand=bypass


    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | Joke of the Day

    0.62