C Programming :: Const / Volatile Qualifier

NA
SHSTTON
2
Solv. Corr.
1
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

1 / 10

What is the output of the following 'C' program?

include
void main ()
{
const int x = get();
printf("%d", x);
}
get()
{
return (20);
}


A20

BError

CGarbage value

D0

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
3
Solv. Corr.
1
Solv. In. Corr.
4
Attempted
0 M:0 S
Avg. Time

2 / 10

What is the output of the following 'C' program ?

#include
void main ()
{
int y = 128;
const int x = y;
printf("%d", x);
}


A128

BError

CGarbage value

D0

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
1
Solv. Corr.
4
Solv. In. Corr.
5
Attempted
0 M:0 S
Avg. Time

3 / 10

What is the output of the following 'C' program?

#include
void main ()
{
const int x = 5;
int *ptrx;
ptrx = &x;
*ptrx = 10;
printf ("%d", x);
}


A5

B10

CError.

DGarbage value

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
12
Solv. Corr.
39
Solv. In. Corr.
51
Attempted
0 M:0 S
Avg. Time

4 / 10

What is the output of the following 'C' program ?

#include
void main ()
{
const int x = 5;
const int *ptrx;
ptrx = &x;
*ptrx = 10;
printf("%d", x);
}


A5

BCompilation Error

C10

DGarbage value

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
0
Solv. Corr.
0
Solv. In. Corr.
0
Attempted
0 M:0 S
Avg. Time

5 / 10

What is the output of the following 'C' program ?
#include <stdio.h>
#define SIZE 3 
void fun(int *ptr)
{
*ptr = *ptr + 1;
}
int main()
{
int oldval;
const int newval = 0;
static int temp = 99;
int i;
for (i=0;i< SIZE;i++)
{
oldval = newval; 
newval = i; 
fun(&temp);
}
printf("%d %d %d",oldval,newval,temp);
}

ACompilation error: assignment of read-only variable

B1 2 102

C1 3 103

DGarbage Value

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
0
Solv. Corr.
0
Solv. In. Corr.
0
Attempted
0 M:0 S
Avg. Time

6 / 10

What is the output of the following 'C' program ?
#include <stdio.h>
void fun1(void)
{
static int dummy = 5; 
dummy = dummy + 10; 
printf("%d",dummy);
}
void fun2(char *c)
{
*c = *c + 2;
printf("%d",dummy);
printf("%c", *c);
}
int main()
{
char ch = 'A'; 
fun1(); 
fun2(&ch); 
printf("%c", ch);
}

A15CC

B15CA

C155CC

DCompilation error: ‘dummy’ undeclared

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
0
Solv. Corr.
4
Solv. In. Corr.
4
Attempted
0 M:0 S
Avg. Time

7 / 10

Choose the correct option.

In a 'C' program, constant is defined


Abefore main

Bafter main

Canywhere, but starting on a new line

Dnone of these

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
0
Solv. Corr.
1
Solv. In. Corr.
1
Attempted
0 M:0 S
Avg. Time

8 / 10

For 'C' programming language


Aconstant expressions are evaluated at compile time

Bstring constants can be concatenated at compile time

Csize of array should be known at compile time

Dall of these

ENone of these

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
13
Solv. Corr.
22
Solv. In. Corr.
35
Attempted
0 M:0 S
Avg. Time

9 / 10

What is output or the error in the program?

#include

void main () {
const char* cptr = "Hello";
printf ("%c", (*++cptr)++);
}


Al-value specifies const object

BNo error, output is e

CNo error, output is H

DNo error, output is 1

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
0
Solv. Corr.
3
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

10 / 10

What will be output of the following "c" code?
#include<stdio.h>
void main()
{
int const *p=5;
printf("%d", ++(p));
}

A9

B5

C6

D0

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace


C Programming Const / Volatile Qualifier Questions and Answers pdf

At C Programming topic Const / Volatile Qualifier page No: 1 you will find list of 10 practice questions, tips/trick and shortcut to solve questions, solved questions, quiz, and download option to download the whole question along with solution as pdf format for offline practice. You can practice all the listed C Programming Const / Volatile Qualifier topic questions offline too, by downloading the MCQs practice question of Const / Volatile Qualifier with detail solution, with formula/Tips & Tricks, with Solved examples and with top-rated users answers, which will give you best answer ascross webs. It is one of the perfect Const / Volatile Qualifier e-book pdf covering all types of questions in detail. These C Programming test with answers pdf cover all types of question asked in IIFT, XAT, SNAP, GRE, GMAT, NMAT, CMAT, MAT or for IT companies written exam like Wipro, HCL, Infosys, Accenture, Government exams, IBPS Exams etc. There are multiple formats to download your online free C Programming Const / Volatile Qualifier e-book, like fully solved, unsolved questions with Answers sheet. Even you can customize your ebook format by adjusting the given options in the download section to make it your one of the best C Programming topic-based ebook. It is recommended to bookmark this page C Programming Const / Volatile Qualifier for your preparation. Most of the students and fresher candidates finding it hard to clear the C Programming section in exams. Here Given Const / Volatile Qualifier practice questions, quiz, fully solved questions, tips & trick and Mock tests, which include question from each topic will help you to excel in Const / Volatile Qualifier. Each test has all the basics questions to advanced questions with answer and explanation for your clear understanding, you can download the test result as pdf for further reference.

At C Programming topic Const / Volatile Qualifier, you will get multiple online quiz difficulty wise, which will have a total of 6 quizzes, categorized as easy, medium, and moderate level. While preparing for any Const / Volatile Qualifier, take all the list quiz and check your preparation level for that topic. Each quiz have 10 different question, which needs to be answered in 20 min., all the listed quiz here is free, however, you will get only one chance for each quiz to attempt(Take Quiz seriously), so it is always recommended to take one quiz in each section before you start solving Const / Volatile Qualifier MCQs practice question, and one after solving all the question of the respective level, you can refer back your Const / Volatile Qualifier quiz result any time or you can download it as pdf for reference.

C Programming Quiz Online Test

The details of the C Programming quiz are as follows. There are 10 questions for you. You have to answer them in 20 minutes. Within 20 minutes you have to see the errors in the sentences given as a question. Four options are also given to you, and you have to choose your opinion. You must be confident in your answer that the choices are difficult. Therefore, below we provide you with some information about C Programming that you see and keep them in mind while answering questions.

C Programming MCQs Practice Questions with Answer

On this section of page you will find the easiest quickest ways to solve a question, formulas, shortcuts and tips and tricks to solve various easiest methods to solve C Programming Question Quickly. It contains all the C Programming topic Const / Volatile Qualifier questions which are common in any of the preliminary exams of any company. The solution is provided along with the questions. The practice of these questions is a must as they are easy as well as scoring and asked in all the exams They will confirm the selection if all the questions attempted wisely with little practice. It is recommanded to Take Mock test based on C Programming topic and Const / Volatile Qualifier topic based quiz.

C Programming solved examples question

Clarity of concepts is a must if you want to master the skill of solving C Programming problems. This page contains sample C Programming questions and answers for freshers and competitive exams. C Programming Questions with the detailed description, the explanation will help you to master the topic. Here solved examples with detailed answer description, explanations are given and it would be easy to understand. How to solve questions relating to C Programming? Here are some examples solved with the Common Rules/tricks/tips of C Programming. Enhance your chance to score maximum marks in C Programming sections through. Error Spotting Grammar Questions Online Test for Free. Fully solved Sentence Formation MCQs questions with detailed answer description. C Programming is an important topic for any exams but most aspirants find it difficult. You need to learn various tricks tips, rules, etc to solve quickly. At this page, you will find frequently asked C Programming questions or problems with solutions, shortcuts, formulas for all-important competitive exams like IT companies exams, interviews. It is always a best practice to go through the example and understand the types of question and way to solve it, so let's do some examples to calculate efficiency, read through all the given here solved examples. You can post your solution, tips, trick and shortcut if you have any in respect to questions.

You can get here fully solved Const / Volatile Qualifier examples with a detailed answer and description. You can solve Const / Volatile Qualifier problems with solutions, the questions by companies wise by filtering the questions, additionally, you can check what type of questions are being asked in IT companies Written Round from Const / Volatile Qualifier. Const / Volatile Qualifier became one of the most important sections in the entire competitive exams, Companies Campus, and entrance online test. Go through Const / Volatile Qualifier Examples, Const / Volatile Qualifier sample questions. You can Evaluate your level of preparation in Const / Volatile Qualifier by Taking the Q4Interivew Const / Volatile Qualifier Online Mock Test based on most important questions. All the Const / Volatile Qualifier practice questions given here along with answers and explanations are absolutely free, you can take any number of time any mock Test.

Why C Programming Const / Volatile Qualifier?

In this practice section, you can practice C Programming Questions based on "Const / Volatile Qualifier" and improve your skills in order to face the interview, competitive examination, IT companies Written exam, and various other entrance tests (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get C Programming Const / Volatile Qualifier questions and answers with explanation?

Q4Interview provides you lots of fully solved C Programming (Const / Volatile Qualifier) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. You can download C Programming Const / Volatile Qualifier quiz questions with answers as PDF files and eBooks.

Where can I get C Programming Const / Volatile Qualifier Interview Questions and Answers (objective type, multiple-choice, quiz, solved examples)?

Here you can find objective type C Programming Const / Volatile Qualifier questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.