Samsung C Language paper

Posted on :08-02-2016

Samsung C interview questions Samsung Technical written test questions

Q1. When compiler accepts the request to use the variable as a register?

a) It is stored in CPU
b) It is stored in cache memory
c) It is stored in main memory
d) It is stored in secondary memory

ANS: a

Q2. Which data type can be stored in register?

a) int
b) long
c) float
d) All of the mentioned

ANS: d

Q3. Which of the following operation is not possible in a register variable?

a) Reading the value into a register variable
b) Copy the value from a memory variable
c) Global declaration of register variable
d) All of the mentioned

ANS: d

Q4. Which among the following is the correct syntax to declare a static variable register?

a) static register a;
b) register static a;
c) Both (a) and (b)
d) We cannot use static and register together.

ANS: d

Q5. Register variables reside in

a) stack
b) registers
c) heap
d) main memory

ANS: b

Q6. What is the output of this C code?

 #include
void main()
{
register int x = 0;
if (x < 2)
{
x++;
main();
}
}

a) Segmentation fault
b) main is called twice
c) main is called once
d) main is called thrice

ANS: a

Q7. What is the output of this C code?

#include
void main()
{
register int x;
printf("%d", x);
}

a) 0
b) Junk value
c) Compile time error
d) Noting

ANS: b

Q8. What is the output of this C code?

#include
register int x;
void main()
{
printf("%d", x);
}

a) varies
b) 0
c) Junk value
d) Compile time error 

ANS: d





Placement Papers for All Companies




FreshersLive - No.1 Job site in India. Here you can find latest 2022 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail...
DMCA.com Protection Status