Samsung Interview Question for Software Engineer / Developers


Country: India




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

All exceptions end up in std::terminate() in the end.
If your application MUST NOT crash (e.g. you are coding a safety critical system) then you would be wise to override std::terminate() by passing a pointer to your own exception handler to std::set_terminate().

Your handler should then take whatever action is appropriate to keep your system safe.

- Simon Raybould March 26, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In what language? Can you give an example of an exception that's not caught by try-catch?

- eugene.yarovoi March 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

It is tagged C++. What about stackoverflow exception or something similar?

- Anonymous March 27, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 2 vote

catch throwable in java

- lin March 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

It is tagged C++.

- Mauricio.Malf May 31, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Make your own exception.

- alex March 31, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Make a custom exception handler..

public class InvalidOptionCountException extends Exception {
	
	public InvalidOptionCountException(int count) {
		System.out.println("Invalid count: " + count);		
	}
	
}

- GReeky March 06, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Yes, we can handle those exceptions which are not handled in try catch block.
We can handle the exception in app file.
All the errors which get escaped from catch block, handles in app file, here we can manage it according to our need. Thus preventing to be get crashed.

- Anita Chauhan April 01, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

simple and nice

- debaprasad July 28, 2014 | Flag


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