[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Variables & Data Types Questions

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

31 / 51

What will be output of the following "c" code?

#include
void main()
{
register int a=2;
printf("Address of a = %p",&a);
printf("Value of a = %d",a);
}


ACompiler Error: '&' on register variable

B2 2

Ca's address 2

DCompilation Error

ENone of these

Answer: Option A

Explanation:

& (address of ) operator cannot be applied on register variables.

Workspace

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

32 / 51

What will be output of the following "c" code?

#include
void main()
{
extern i;
printf("%d\n",i);
{
int i=20;
printf("%d\n",i);
}
}


A20

BCompilation Error

CLinker Error : Unresolved external symbol i

DNone of these

Answer: Option C

Explanation:

The identifier i is available in the inner block
so using extern has no use in resolving it.

Workspace

NA
SHSTTON
25
Solv. Corr.
48
Solv. In. Corr.
73
Attempted
0 M:5 S
Avg. Time

33 / 51

What will be output of the following "c" code?
#include<stdio.h>
void main(){
   float a=5.2;
  if(a==5.2)
     printf("Equal");
  else if(a<5.2)
     printf("Less than");
  else
     printf("Greater than");
}

AEqual

BGreater than

CLess than

DCompilation Error

Answer: Option C

Explanation:

5.2 is a double-type constant in C. In C, size of double-type data is 8 bytes while variable 'a' is of float-type. Size of float variable is 4 bytes.
So, double-type constant, i.e, 5.2 is stored in the memory as-
101.00 11001100 11001100 11001100 11001100 11001100 11001101
On the other hand, content of variable 'a' will be stored in the memory as-
101.00110 01100110 01100110
It is clear that variable 'a' is less than the double-type constant 5.2.
Hence, the output is Less than.

Workspace

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

34 / 51

Choose the correct option.

By default any real number in 'C' is treated as


Aa float

Ba double

Ca long double

DDepends upon the memory model that you are using

Answer: Option B

Explanation:

Real number generally means non-complex floating-point numbers. It includes both rational and irrational numbers.

When the accuracy of the floating point number is insufficient, we can use 'double' to define the number. The 'double' is same as 'float' but with longer precision and takes double space (8 bytes) than float.

To extend the precision further we can use 'long double', which occupies 10 bytes of memory space.

Workspace

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

35 / 51

Choose the correct option.

Which of the following statements is (are) correct?


Aenum variables can be assigned new values

Benum variables can be compared

Cenumeration feature does not increase the power of C

Dall of the above

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

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

36 / 51

When a variable of data type double is converted into float, then


Arounding takes place

Btruncation takes place

Cthe lower order bits are dropped

Dnone of these

Answer: Option A

Explanation:

float and double don't store decimal places, rather they store binary places. Assuming IEEE 754, float is 24 significant bits(7.22 decimal digits), and double is 53 significant bits(15.95 decimal digits).

Hence, converting from double to float will give you the closest possible, or you can say rounding-off takes place.


Workspace

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

37 / 51

A static variable


Acannot be initialized

Bis initialized once at the commencement of execution and cannot be changed at run time.

Cretains its value throughout the file of the program

Dis same as an automatic variable but is placed at the head of a program

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

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

38 / 51

An external variable


Ais globally accessible by all functions

Bhas a declaration "extern" associated with it when declared within a function

Cwill be initialized to O if not initialized

Dall of the abov

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
225
Solv. Corr.
322
Solv. In. Corr.
547
Attempted
0 M:28 S
Avg. Time

39 / 51

What is the output of the program?

#include
int main()
{
extern int a;
printf("%d\n",a);
return 0;
}

int a =20;


A20

B0

CGarbage Value

DError

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

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

40 / 51

What will be the output?

main()
{
int i=3,a=4,n;
float t=4.2;
n = a*a / i + i / 2 * t + 2 + t;
printf("%d",n);
}


A14

B15.4

C15

DNone of these

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

C Programming Variables & Data Types Questions and Answers pdf

At C Programming topic Variables & Data Types page No: 4 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 Variables & Data Types topic questions offline too, by downloading the MCQs practice question of Variables & Data Types 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 Variables & Data Types 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 Variables & Data Types 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 Variables & Data Types for your preparation. Most of the students and fresher candidates finding it hard to clear the C Programming section in exams. Here Given Variables & Data Types practice questions, quiz, fully solved questions, tips & trick and Mock tests, which include question from each topic will help you to excel in Variables & Data Types. 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 Variables & Data Types, 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 Variables & Data Types, 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 Variables & Data Types MCQs practice question, and one after solving all the question of the respective level, you can refer back your Variables & Data Types quiz result any time or you can download it as pdf for reference.

C Programming Variables & Data Types Customize Online Mock Test

This is own type of mock test, where At this C Programming Variables & Data Types MCQs mock test section, you will able to attempt only the questions related to Variables & Data Types, in that question will be a different level, important, and all the questions will be part of some of the mock tests across Q4interview FREE Mock test. You need to choose the topic as Variables & Data Types, and click on Double click to generate your customize mock test. While attempting the mock test you need to choose any of the one options out of given option. It is recommended to go through the direction given along with each question, as these questions will be randomly and so that same direction will not be applicable across the entire test. Once you submit your mock test, the result will be generated for Variables & Data Types Customize mock test, where your performance point points will be highlighted. Q4interview analysis every single point which helps you to improve your topic understanding and help you to know your type of mistakes and way to improve Variables & Data Types questions, by providing the same type of practice questions from practice exercise. The best part of this Variables & Data Types, all these mock tests listed here are free and you can take as Many time, as many you want. When you continue to give Variables & Data Types Customize Online Mock Test here regularly, then you will understand how much you have developed your accuracy on a topic, after that you will be able to decide how much attention you need to focus on. Your continued practice will increase your confidence, speed and thinking ability intensely, the Variables & Data Types Customize topic on which you will practice more will beneficial for you in future during campus placement.Variables & Data Types Mock Tests

C Programming Variables & Data Types Quiz Online Test

The details of the C Programming Variables & Data Types 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 Variables & Data Types that you see and keep them in mind while answering questions.

C Programming Variables & Data Types MCQs Practice Questions with Answer

On this Variables & Data Types 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 Variables & Data Types Question Quickly. It contains all the C Programming topic Variables & Data Types 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 Variables & Data Types topic based quiz.

C Programming Variables & Data Types 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 Variables & Data Types questions and answers for freshers and competitive exams. Variables & Data Types 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 qVariables & Data TypesC 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 Variables & Data Types 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 Variables & Data Types examples with a detailed answer and description. You can solve Variables & Data Types 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 Variables & Data Types. Variables & Data Types became one of the most important sections in the entire competitive exams, Companies Campus, and entrance online test. Go through Variables & Data Types Examples, Variables & Data Types sample questions. You can Evaluate your level of preparation in Variables & Data Types by Taking the Q4Interivew Variables & Data Types Online Mock Test based on most important questions. All the Variables & Data Types 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 Variables & Data Types?

In this practice section, you can practice C Programming Questions based on "Variables & Data Types" 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 Variables & Data Types questions and answers with explanation?

Q4Interview provides you lots of fully solved C Programming (Variables & Data Types) 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 Variables & Data Types quiz questions with answers as PDF files and eBooks.

Where can I get C Programming Variables & Data Types Interview Questions and Answers (objective type, multiple-choice, quiz, solved examples)?

Here you can find objective type C Programming Variables & Data Types questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.