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

Cross Compiler - GATE CSE (CSE) Design Free MCQ Test with solutions


MCQ Practice Test & Solutions: Test: Cross Compiler (15 Questions)

You can prepare effectively for Computer Science Engineering (CSE) Compiler Design with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Cross Compiler". These 15 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.

Test Highlights:

  • - Format: Multiple Choice Questions (MCQ)
  • - Duration: 15 minutes
  • - Number of Questions: 15

Sign up on EduRev for free to attempt this test and track your preparation progress.

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: 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: Question 2

Explanation: So done by the definition.

Test: Cross Compiler - Question 3

Cross-compiler is a compiler

Detailed Solution: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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|92 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
26 videos|92 docs|30 tests
Download as PDF