NVIDIA Interview Question for Software Engineer / Developers






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

thread has its own stack, so auto declared inside thread should not be visible outside

if you mean a static variable as a global variable inside the thread, imo it should not be visible outside the thread.

- arh August 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

AS per me static variables declared inside thread are visible to other threads since all threads have the same address space

- CUNOMAD August 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How u write a thread?
Windows/pThread both ways u take a function as the thread_main function.
Now - where can you *declare* global variable ???

- Lord Darth Plagueis August 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

HOW about declaring a global variable inside a function which is executed by all threads but in this case for sure that variable will be visible to all the threads

- CUNOMAD August 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Auto variables are stored on stack, whereas global and static variables are stored in data segment. Threads share all segments expect stack. So they share the auto variables, but not the global or static.

- Furquan February 07, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

AUto in stack-unique to thread . so not visible

Static and global data in Data segment.shared. so visible.

- focker123 March 19, 2013 | 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