C Programming Language : Intermediates


1. What will be the output of the code ________?


    #include<stdio.h>

    void main()

    {

        int i= 5;
        
        if (i < 1)
        
            printf("hello");
        
        if (i == 5)
        
            printf("hi");
        
        else
        
            printf("no");
         
    }



2. What will be the output of the code ________?


    #include<stdio.h>

    void main()

    {

        int i = 5;
        
        if (true);
            
        printf("hello");

    }



3. What will be the output of the code ________?


    #include<stdio.h>

    void main()

    {

        int i = 5;

        if (i< 1);

        printf("I Love Minigranth");

    }



4. What will be the output of the code ________?


    #include<stdio.h>

    void main()

    {    
        
        register static int i = 5;
        
        i = 6;
        
        printf("%d\n", i);

    }



5. What is the sequence for preprocessor to look for the file within?




6. Choose the correct option for const int *ptr.




7. Register keyword mandates compiler to place it in machine register?




8. Automatic variables are allocated memory in?




9. Automatic variables are ?




10. What will be the output of the code ________?


    #include<stdio.h>

    int main()

    {
       
        register int i = 15;

        int *p = &i;

        *p = 16;

        printf("%d %d\n", i, *p);
         
    }