Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Compiler Design  >  Test: Cross Compiler - Computer Science Engineering (CSE) MCQ

Test: Cross Compiler - Computer Science Engineering (CSE) MCQ


Test Description

15 Questions MCQ Test Compiler Design - Test: Cross Compiler

Test: Cross Compiler for Computer Science Engineering (CSE) 2024 is part of Compiler Design preparation. The Test: Cross Compiler questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Cross Compiler MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Cross Compiler below.
Solutions of Test: Cross Compiler questions in English are available as part of our Compiler Design for Computer Science Engineering (CSE) & Test: Cross Compiler solutions in Hindi for Compiler Design course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Cross Compiler | 15 questions in 15 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Compiler Design for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Cross Compiler - Question 1

A system program that combines separately compiled modules of a program into a form suitable for execution is

Detailed Solution for Test: Cross Compiler - Question 1

Explanation: The definition of cross compiler.

Test: Cross Compiler - Question 2

A compiler for a high-level language that runs on one machine and produces code for a different machine is called

Detailed Solution for Test: Cross Compiler - Question 2

Explanation: So done by the definition.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Cross Compiler - Question 3

Cross-compiler is a compiler

Detailed Solution for Test: Cross Compiler - Question 3

A compiler for a high-level language that runs on one machine and produces code for a different machine is called a cross compiler.

Test: Cross Compiler - Question 4

Cross compiler is used in Bootstrapping.

Detailed Solution for Test: Cross Compiler - Question 4

Explanation: Bootstrapping to a new platform. When a software is developed for a new platform, a cross compiler is used to compile necessary tools such as the OS and a native compiler.

Test: Cross Compiler - Question 5

Is GCC a cross Complier

Detailed Solution for Test: Cross Compiler - Question 5

Explanation:
GCC, a free software collection of compilers, also can be used as cross compile. It supports many languages and platforms.

Test: Cross Compiler - Question 6

The __________ is a technique for building cross compilers for other machines

Detailed Solution for Test: Cross Compiler - Question 6

Explanation: The Canadian Cross is a technique for building cross compilers for other machines. Given three machines X, Y, and Z, one uses machine X (e.g. running Windows XP on an IA-32 processor) to build a cross compiler that runs on machine Y (e.g. running Mac OS X on an x86-64 processor) to create executables for machine Z.

Test: Cross Compiler - Question 7

_________ was developed from the beginning as a cross compiler

Detailed Solution for Test: Cross Compiler - Question 7

Explanation: Free Pascal was developed from the beginning as a cross compiler. The compiler executable (ppcXXX where XXX is target architecture) is capable of producing executables for all OS of the same architecture.

Test: Cross Compiler - Question 8

If we compile the sam.c file with the command “gcc -o sam sam.c”, then the executable file will be

Detailed Solution for Test: Cross Compiler - Question 8

Explanation: This is how the GCC is designed to take names of executable files.

Test: Cross Compiler - Question 9

What will be output of the following code?

#include<stdio.h>
int main()
{
printf("%d\t",sizeof(6.5));
printf("%d\t",sizeof(90000));
printf("%d",sizeof('A'));
return 0;
}

Detailed Solution for Test: Cross Compiler - Question 9

Explanation: GCC compilers (32 bit compilers) size of:
double is 8 byte
long int is 8 byte
Character constant is 2 byte.

Test: Cross Compiler - Question 10

What will be output of the following c code? ( according to GCC compiler)

#include<stdio.h>
int main()
{
signed x;
unsigned y;
x = 10 +- 10u + 10u +- 10;
y = x;
if(x==y) printf("%d %d",x,y);
else if(x!=y) printf("%u %u",x,y);
return 0;
}

Detailed Solution for Test: Cross Compiler - Question 10

Explanation: Consider on the expression:
x = 10 +- 10u + 10u +- 10;
10: It is signed integer constant.
10u: It is unsigned integer constant.
X: It is signed integer variable.
As we know operators enjoy higher precedence than binary operators. So
x = 10 + (-10u) + 10u + (-10);
= 10 + -10 + 10 + (-10);
= 0
So, Corresponding signed value of unsigned 10u is +10.

Test: Cross Compiler - Question 11

What will be output of the following c code?

#include<stdio.h>
int main()
{
const int *p;
int a=10;
p=&a;
printf("%d",*p);
return 0;
}

Detailed Solution for Test: Cross Compiler - Question 11

Explanation: In the following declaration
const int *p;
p can keep address of constant integer.

Test: Cross Compiler - Question 12

What will be output of the following c code?

#include<stdio.h>
int main()
{
int a= sizeof(signed) +sizeof(unsigned);
int b=sizeof(const)+sizeof(volatile);
printf("%d",a+++b);
return 0;
}

Detailed Solution for Test: Cross Compiler - Question 12

Explanation: Default data type of signed, unsigned, const and volatile is intSo, a = 4 and b =4
Now, a+++b
= a++ + b
= 4 + 4 //due to post increment operator.
=8
But in Linux gcc compiler size of int is 4 byte so your out will be 16.

Test: Cross Compiler - Question 13

Which of the following is integral data type?

Detailed Solution for Test: Cross Compiler - Question 13

Expanation:
In c char is integral data type. It stores the ASCII value .

Test: Cross Compiler - Question 14

 What will be output of the following c code?

#include<stdio.h>
int main()
{
volatile int a=11;
printf("%d",a);
return 0;
}

Detailed Solution for Test: Cross Compiler - Question 14

Explanation: Value of volatile variable can’t be predicted because its value can be changed by any microprocessor interrupt.

Test: Cross Compiler - Question 15

 What will be output of the following c code?

#include<stdio.h>
const enum Alpha { X, Y=5, Z }p=10;
int main()
{
enum Alpha a,b;
a= X; b= Z;
printf("%d",a+b-p);
return 0;
}

Detailed Solution for Test: Cross Compiler - Question 15

Explanation: Default value X is zero and
Z = Y + 1 = 5 + 1 = 6
So, a + b – p
=0 + 6 -10 = -4.

26 videos|66 docs|30 tests
Information about Test: Cross Compiler Page
In this test you can find the Exam questions for Test: Cross Compiler solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Cross Compiler, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

26 videos|66 docs|30 tests
Download as PDF

Top Courses for Computer Science Engineering (CSE)