NVIDIA Interview Question






Comment hidden because of low score. Click to expand.
1
of 1 vote

Compilation phase : Produces assembly code[Instruction sets defined for the Core].
Assembler : Convert assembly instructions into opcode-offset format ..object file[usually a relocatable code].
Linker : Link different object file via resolving references and consolidate them into an executable file.

Let me know if i am wrong or need more explainations :)

- Shwetank Gupta October 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Shwetank Gupta : you explained in lucid and very good

- Rajan May 13, 2011 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Normally the C’s program building process involves four stages and utilizes different ‘tools’ such as a preprocessor, compiler, assembler, and linker.
At the end there should be a single executable file. Below are the stages that happen in order regardless of the operating system/compiler and graphically illustrated in Figure w.1.
Preprocessing is the first pass of any C compilation. It processes include-files, conditional compilation instructions and macros.
Compilation is the second pass. It takes the output of the preprocessor, and the source code, and generates assembler source code.
Assembly is the third stage of compilation. It takes the assembly source code and produces an assembly listing with offsets. The assembler output is stored in an object file.
Linking is the final stage of compilation. It takes one or more object files or libraries as input and combines them to produce a single (usually executable) file. In doing so, it resolves references to external symbols, assigns final addresses to procedures/functions and variables, and revises code and data to reflect new addresses (a process called relocation)

- sk July 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

can anyone clearly explain wat is linking???? and wat is .obj file,.lib and so on......

- joy.vivin March 06, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@ joy.vivin

linking:

there are 4 stage when you compile and execute your programme...

1. preprocessing gcc -E your_file_name.c -o final.i
2. Compiling gcc -S final.i -o final.s
3. Assembling gcc -c final.s -o final.o
4. linking gcc -o final.o final

when you write printf function in c programme . at preprossing stage it is replace by actual function calling parameter. it does not know where the defination of printf function is. but at the time of linking it provide information of defination of printf.
if you are using static linking then it will include printf function defination along with executable. if you are using dynamic linking then it will include some information about where to find defination of printf function when you will ececute this programme in anothe machine.

@> let me know if i am wrong.....

- Gaurav Kumar Garg December 23, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

@ sk.. "SWEETTTT!!"

- CodeGeek January 12, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@sk good one

- kiran April 28, 2011 | Flag
Comment hidden because of low score. Click to expand.
-1
of 1 vote

thanks

- Anonymous October 29, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

@Shwetank,
Sounds good to me.

- S3 November 01, 2009 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More