Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
struct student
{
    char *c;
};
void main()
{
    struct student n;
    struct student *s = &n;
    (*s).c = "hello";
    printf("%p\n%p\n", s, &n);
}

A. Different address

B. Run time error

C. Nothing

D. Same address

Answer: Option D


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union