adplus-dvertising

Welcome to the Data Types,Operators and Expressions in C MCQs Page

Dive deep into the fascinating world of Data Types,Operators and Expressions in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Data Types,Operators and Expressions in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Data Types,Operators and Expressions in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Data Types,Operators and Expressions in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Data Types,Operators and Expressions in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Data Types,Operators and Expressions in C MCQs | Page 5 of 66

Explore more Topics under C Programming

Q41.
What is the output of this C code?
#include <stdio.h>
    void foo(const int *);
    int main()
    {
        const int i = 10;
        printf("%d ", i);
        foo(&i);
        printf("%d", i);
 
    }
    void foo(const int *i)
    {
        *i = 20;
    }
Discuss
Answer: (a).Compile time error
Q42.
Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        const int i = 10;
        int *ptr = &i;
        *ptr = 20;
        printf("%d\n", i);
        return 0;
    }
Discuss
Answer: (b).Compile time warning and printf displays 20
Q43.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        j = 10;
        printf("%d\n", j++);
        return 0;
    }
Discuss
Answer: (c).Compile time error
Q44.
Does this compile without error?
#include <stdio.h>
    int main()
    {
        for (int k = 0; k < 10; k++);
            return 0;
    }
Discuss
Answer: (c).Depends on the C standard implemented by compilers
Q45.
Does this compile without error?
#include <stdio.h>
    int main()
    {
        int k;
        {
            int k;
            for (k = 0; k < 10; k++);
        }
    }
Discuss
Answer: (a).Yes
Q46.
Which of the following declaration is not supported by C?
Discuss
Answer: (a).String str;
Q47.
#include <stdio.h>
    int main()
    {
        char *var = "Advanced Training in C by Sanfoundry.com";
    }


Which of the following format identifier can never be used for the variable var?
Discuss
Answer: (a).%f
Discuss
Answer: (d).char[] str = β€œBest C programming classes”;
Q49.
Which keyword is used to prevent any changes in the variable within a C program?
Discuss
Answer: (c).const
Discuss
Answer: (d).char a;

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!