DEV Community

Cover image for Puzzle-1
Dhanashree Rugi
Dhanashree Rugi

Posted on • Edited on

Puzzle-1

Can you guess the output without the help of code editor ?

If yes, then comment the output in the below comment section.

#include <stdio.h>
struct result
{
    int marks;
    char grade;
};
int main()
{
    struct result a1, b1;
    a1.marks = 50; a1.grade = 'A';
    b1 = a1;
    printf("marks = %d\n", b1.marks);
    printf("grade = %c\n", b1.grade);
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)