A PHP Error was encountered

Severity: Warning

Message: fopen(/var/lib/php/sessions/ci_session67qp4g6qoocg7ch1e64mk6l80s22b4pv): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 176

Backtrace:

File: /var/www/interviewmania.com/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Failed to read session data: user (path: /var/lib/php/sessions)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /var/www/interviewmania.com/index.php
Line: 315
Function: require_once

Structures Easy Questions and Answers | Page - 15

Structures


  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Cricket_Team
    {
    int A;
    int B;
    } t[] = {150, 250, 350, 450, 550};
    void function(struct Cricket_Team*);
    int main()
    {
    function(t);
    }
    void function(struct Cricket_Team t[])
    {
    printf("%d %d\n", t->A, t[2].B);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    150 0


  1. What will be the output of the following C code?
     #include &l;stdio.h>
    struct Price
    {
    int m;
    int n;
    };
    void fun(struct Price*);
    int main()
    {
    struct Price p1[] = {105, 210, 310, 49, 59};
    fun(p1);
    }
    void fun(struct Price p[])
    {
    printf("%d %d\n", p->m, p[3].n);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    105 0



  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Count
    {
    int m;
    int n;
    };
    void fun(struct Count*);
    int main()
    {
    struct Count c1[] = {14, 24, 34, 44, 54};
    fun(c1);
    }
    void fun(struct Count c2[])
    {
    printf("%d %d\n", c2->m, (c2 + 2).n);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    Compilation Error

    main.c: In function ‘fun’:
    main.c:15:42: error: ‘c2 + 16’ is a pointer; did you mean to use ‘->’?
    printf("%d %d\n", c2->m, (c2 + 2).n);


  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Option
    {
    int t1;
    int t2;
    };
    void fun(struct Option*);
    int main()
    {
    struct Option opt1[] = {12, 22, 23, 24, 25};
    fun(opt1);
    }
    void fun(struct Option opt[])
    {
    printf("%d %d\n", opt->t1, (opt + 2)->t2);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    12 0



  1. What will be the output of the following C code?
    #include <stdio.h>
    struct alphabet
    {
    char *ch;
    };
    void main()
    {
    struct alphabet alp[2];
    printf("%d", sizeof(alp));
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    16