Interview Questions and Answers for 'C' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'C' - 2780 question(s) found - Order By Rating

next 30
 Q1. What is Array.Map function ? What will be output of following ?

const myArray = [1, 4, 9, 16];
const result = myArray.map(x => x * 2);
Javascript
Ans. It will create an array with each value as x*2

[2, 8, 18, 32]

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q2. What is systemd in Unix ?Unix
 This question was recently asked at 'Broadcom, Symantec'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q3. Why cannot we initialize a final field within the constructor if the initialization is within try block ?Core Java
Ans. What if the initialization throws an exception. In that case , it will let it move forward without initializing the final field. So it's a way to enforce that either the field is initialized or it fails completely.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     oops


 Q4. Can we initialize final fields within the constructor ? Why ?Core Java
Ans. Yes, Because final fields needs to be initialized before the construction of the object completes. Not necessarily at the time of class loading.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     oops


 Q5. Will this code give any error ?

let result: string;
result = false || 'true';
Typescript
Ans. No

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q6. Will this code give any error ?

let result: boolean | string;
result = false || 'true';
Typescript
Ans. No

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q7. Will this code give any error ?

let result: boolean;
result = false || true;
Typescript
Ans. No

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q8. Will the following code give any error

let result: boolean;
result = false | true;
Typescript
Ans. Yes, | is a bitwise operator and not boolean or. Use || instead

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q9. Will the following code give any error

let result: string | number;
result = 'true';
Typescript
Ans. No

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q10. Will the following code give any error

let result: string | number;
result = 'true';
Typescript
Ans. No

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q11. Will the following code give any error

let result: string | number;
result = true;
Typescript
Ans. Yes, result can either be string or a number but not boolean.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q12. What does the following declaration mean

let result: string | number;
Typescript
Ans. It means we can assign either a string or a number to result.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q13. How can we specify that a particular variable may have either of the two data types in Typescript ? Typescript
Ans. Yes

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q14. How can we specify that a particular variable may have either of the two data types in Typescript ? Typescript
Ans. let result: string | boolean;

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q15. Can we specify that a particular variable may have either of the two data types in Typescript ? Typescript
Ans. let result: string | boolean;

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q16. Is it safe to use session storage ?Javascript
Ans. Session storage can be accessed from XSS (Cross site Scripting) attacks but cookies (if set with "HttpOnly" and "Secure" flags) are more safer against these attacks.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     session storage  security


 Q17. How can you trim all strings in an array ?
Ans. array.map(s => s.trim())

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   angular   typescript   javascript


 Q18. Do you ever merge changes from one feature branch to another ? Why ?SCM
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     SCM  Source Code Management  Configuration Control  Git  Svn


 Q19. Can we do a thread specific heap allocation ?Memory Management
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     memory management  heap memory   heap allocation      expert


 Q20. Why do we do transformation on the observable itself rather than doing it in the subscriber ? RxJs
Ans. Because that way we just need to do that transformation at one place and not within each subscriber. Single source of truth.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Angular   Observable  Suscriber


 Q21. What is the difference between Subject and Observable ?Angular
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     subject vs observable


 Q22. What is the difference between subscribe and unsubscribe ?Angular
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     RxJs   subscribe vs unsubscribe


 Q23. What is the difference between subscribe and emit ?Angular
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     subscribe vs emit


 Q24. What is a pseudo-class?CSS
Ans. It is a CSS technique that sets the style when an element changes its state. E.g. style changes when mouse hover, different styles for visited or unvisited links, etc.

There are four different types of pseudo-classes:

Links: These pseudo-classes are used to style the link both in its normal state by default and when it has already been visited
Dynamic: Dynamic pseudo-classes can be applied to any element to define how they are shown when the cursor is located on them, or by clicking on them or when they are selected
Structural: Structural pseudo-classes allow to style elements based on an exact numerical position of the element
Others: Some elements can be styled differently based on the language or what type of label they are not.
Format
Name
Elements are styled if
Compatibility
Link and Dynamic Pseudo-classes
: link   Link   the value of the href attribute is not in the history   IE4, FF1, O3.5, S1, CSS1
: visited   Link Visited   the value of the href attribute is in the history   IE4, FF1, O3.5, S1, CSS1
: target   Target Link   a targeted link   FF1.3, O9.5, S1.3, CSS3
: active   Active   the element has been clicked   IE7, FF1, O3.5, S1, CSS1
: hover   On   the cursor is over the element   IE4 *, FF1, O3.5, S1, CSS2
: focus   Focus   the element captures the focus of the document   IE7, FF1, O7, S1, CSS2
* Only available for the item before IE7
Structural and Other Pseudo-classes
: root   Root   is the main element of a document   FF1.5, O9.5, S3.1, C3, CSS3
: empty   Empty   does not have child nodes   FF1.5, O9.5, S3.1, C3, CSS3
: only-child   Only son   has no sibling nodes   FF1.5, O9.5, S3.1, C3, CSS3
: only-of-type   Type Only   has a unique selector among its siblings   FF1.5, O9.5, S3.1, C3, CSS3
: first-child   First son   is the first child node of another element   FF1.5, O9.5, S3.1, C3, CSS3
: nth-of-type (n)   Nth of Type   is the nth element with that selector   FF1.5, O9.5, S3.1, C3, CSS3
: last-child   Last son   is the last child node of an element   FF1.5, O9.5, S3.1, C3, CSS3
: first-of-type   First of the Kind   is the first element of its selector type in the parent element   FF1.5, O9.5, S3.1, C3, CSS3
: last-of-type   Last of the Type   is the last element of its selector type in the parent element   FF1.5, O9.5, S3.1, C3, CSS3
: lang   Language   has a specifically defined language code   IE8, FF1.5, O9.5, S3.1, C3, CSS2.1
: not   Denial   you are not using a specific selector   FF1.5, O9.5, S3.1, C3, CSS3

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q25. What are the main features of Java?Core Java
Ans. a) Object Oriented
b) Simple
c) Platform Independent
d) Secured
e) Robust
f) Portable
g) Multithreaded
h) Distributed

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q26. What are the fundamental principles of object oriented programming? / What are the OOPs concepts?Core Java
Ans. a) Inheritance
b) Abstraction
c) Polymorphism
d) Encapsulation

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q27. What do you mean by inheritance in java?Core Java
Ans. Inheritance is one of the key principle of object oriented programming. Through inheritance, one class can inherit the properties of another class. The class from which properties are inherited is called super class and the class to which properties are inherited is called sub class.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q28. Which one of AWS Lambda or API Gateway is a compute service ?Amazon Web Services (AWS)
Ans. AWS Lambda

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws lambda      basic


 Q29. How can print the whole object state in the console in javascript ?Javascript
Ans. We can JSON.stringify

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     javascript  angular


 Q30. What are the differences between static and non-static methods?Core Java
Ans. Static method is common to all instances of a class. Static methods are stored in the class memory. Whereas non-static methods are stored in the object memory. Each instance of a class will have their own copy of non-static methods.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: