0% found this document useful (0 votes)
15 views12 pages

Software Engineering Internship Exam 100q With Answers

The document is a Software Engineering Internship Exam consisting of 100 multiple-choice questions (MCQs) covering various topics in software engineering, programming languages, data structures, algorithms, databases, operating systems, and software development practices. Each question is followed by the correct answer, which is bolded. The exam tests knowledge on concepts such as OOP principles, SQL queries, HTTP methods, and Agile methodologies.

Uploaded by

asushan762
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

Software Engineering Internship Exam 100q With Answers

The document is a Software Engineering Internship Exam consisting of 100 multiple-choice questions (MCQs) covering various topics in software engineering, programming languages, data structures, algorithms, databases, operating systems, and software development practices. Each question is followed by the correct answer, which is bolded. The exam tests knowledge on concepts such as OOP principles, SQL queries, HTTP methods, and Agile methodologies.

Uploaded by

asushan762
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Software Engineering Internship Exam – 100 MCQs (Answers bolded)

Q1. Which of the following is NOT an OOP principle?


A) Encapsulation
B) Inheritance
C) Polymorphism
D) Compilation
Q2. Which keyword in Java creates a subclass?
A) extends
B) implements
C) inherits
D) derives
Q3. In Python, which type is immutable?
A) list
B) tuple
C) dict
D) set
Q4. Which access modifier makes a member visible only within its class (Java)?
A) private
B) public
C) protected
D) package-private
Q5. Which operator represents floor division in Python?
A) /
B) //
C) %
D) **
Q6. In C, which header is required to use printf?
A) stdlib.h
B) stdio.h
C) string.h
D) math.h
Q7. Which of these best describes polymorphism?
A) Same name, different forms
B) Hiding data members
C) Deriving new classes
D) Separating interface from implementation
Q8. What does the 'static' keyword mean for a Java method?
A) Belongs to the class
B) Cannot be overridden
C) Is thread-safe
D) Runs faster
Q9. Which of the following languages is primarily compiled to bytecode?
A) C
B) C++
C) Java
D) Go
Q10. What is the output type of Python's range(3)?
A) list
B) tuple
C) range object
D) generator
Q11. Which statement is TRUE about interfaces (Java)?
A) Can have instance fields
B) Can be instantiated
C) Can have default methods
D) Cannot be inherited
Q12. Which of the following is a strongly typed, statically typed language?
A) Python
B) JavaScript
C) TypeScript
D) Java
Q13. Which data structure uses FIFO?
A) Stack
B) Queue
C) Tree
D) Graph
Q14. Which data structure gives O(1) average-time search?
A) Binary search tree
B) Hash table
C) Linked list
D) Queue
Q15. Which sorting algorithm is stable?
A) Selection sort
B) Quick sort
C) Merge sort
D) Heap sort
Q16. Time complexity of binary search on a sorted array?
A) O(n)
B) O(log n)
C) O(n log n)
D) O(1)
Q17. Worst-case time for quicksort?
A) O(n)
B) O(log n)
C) O(n log n)
D) O(n^2)
Q18. Which traversal of a BST yields sorted order?
A) Preorder
B) Inorder
C) Postorder
D) Level order
Q19. What is the height of a complete binary tree with n nodes (big-O)?
A) O(n)
B) O(log n)
C) O(1)
D) O(n log n)
Q20. Which data structure is best for LRU cache?
A) Queue
B) Stack
C) HashMap + Doubly Linked List
D) Priority Queue
Q21. Which algorithm solves single-source shortest path with non-negative weights?
A) Bellman-Ford
B) Dijkstra
C) Floyd–Warshall
D) Prim
Q22. Which is used to detect cycles in an undirected graph?
A) BFS/DFS
B) Topological sort
C) Kruskal only
D) Prim only
Q23. Which algorithm is commonly used for topological sorting?
A) BFS (Kahn's)
B) Prim's
C) Dijkstra's
D) Kruskal's
Q24. Amortized time to append to Python list?
A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)
Q25. Which operation is O(1) on a singly linked list (with head only)?
A) Delete tail
B) Insert at head
C) Find middle
D) Get last
Q26. Which data structure is ideal for implementing recursion?
A) Queue
B) Stack
C) Set
D) Heap
Q27. Which algorithm is used for minimum spanning tree?
A) Dijkstra
B) Kruskal
C) Bellman-Ford
D) A*
Q28. Which key uniquely identifies a row in a table?
A) Foreign key
B) Primary key
C) Composite key
D) Index
Q29. Which SQL clause filters rows after grouping?
A) WHERE
B) GROUP BY
C) HAVING
D) ORDER BY
Q30. Which isolation level allows dirty reads?
A) READ UNCOMMITTED
B) READ COMMITTED
C) REPEATABLE READ
D) SERIALIZABLE
Q31. To remove all rows but keep table schema:
A) DELETE
B) TRUNCATE
C) DROP
D) ALTER
Q32. Which normal form removes transitive dependency?
A) 1NF
B) 2NF
C) 3NF
D) BCNF
Q33. Which SQL combines results and removes duplicates by default?
A) UNION
B) UNION ALL
C) INTERSECT
D) JOIN
Q34. What does ACID 'I' stand for?
A) Isolation
B) Indexing
C) Integrity
D) Increment
Q35. Which command grants privileges in SQL?
A) GRANT
B) ALLOW
C) PERMIT
D) ACCESS
Q36. In an ER diagram, a diamond represents:
A) Entity
B) Attribute
C) Relationship
D) Key
Q37. Which index type is best for range queries?
A) Hash index
B) B-Tree
C) Bitmap
D) Full-text
Q38. Which SQL keyword is used to rename a column in SELECT?
A) RENAME
B) AS
C) ALIAS
D) WITH
Q39. Foreign key ensures:
A) Uniqueness
B) Referential integrity
C) Sorting
D) Partitioning
Q40. Which scheduling may cause starvation?
A) FCFS
B) Round Robin
C) SJF (non-preemptive)
D) Priority (non-preemptive)
Q41. Thrashing is caused by:
A) Too many page faults
B) CPU overheating
C) I/O bottleneck
D) Deadlock
Q42. What does a context switch involve?
A) Switching threads
B) Saving/restoring state
C) Clearing cache
D) Rebooting
Q43. Which is NOT a valid state of a process?
A) Running
B) Ready
C) Blocked
D) Terminated-Ready
Q44. In paging, the basic unit of memory management is:
A) Frame/Page
B) Segment
C) Cluster
D) Block
Q45. Which system call creates a new process (Unix)?
A) spawn()
B) fork()
C) exec()
D) clone() only
Q46. What replaces the current process image (Unix)?
A) fork()
B) exec()
C) wait()
D) signal()
Q47. In a multi-core system, which improves CPU utilization?
A) Spinlocks always
B) Multiprogramming
C) Mutual exclusion removal
D) Write-only caches
Q48. Semaphore used for mutual exclusion is typically initialized to:
A) 0
B) 1
C) 2
D) n
Q49. Which memory allocation suffers from external fragmentation?
A) Paging
B) Segmentation
C) Buddy system
D) Swapping
Q50. Which page replacement is optimal (theoretical)?
A) LRU
B) FIFO
C) Clock
D) Belady's MIN
Q51. Which file allocation gives best random access?
A) Contiguous
B) Linked
C) Indexed (e.g., inode + blocks)
D) Extent-based only
Q52. Which OSI layer is responsible for routing?
A) Data Link
B) Network
C) Transport
D) Application
Q53. Which protocol is connection-oriented?
A) UDP
B) IP
C) TCP
D) ARP
Q54. Default port for HTTPS?
A) 80
B) 21
C) 25
D) 443
Q55. Which record type maps a domain to an IP?
A) MX
B) CNAME
C) A/AAAA
D) TXT
Q56. Which HTTP status means 'Not Found'?
A) 200
B) 301
C) 404
D) 500
Q57. Which header is used to keep a TCP connection alive for multiple requests?
A) Connection: keep-alive
B) Accept
C) ETag
D) Cache-Control: no-store
Q58. CIDR /24 has how many usable IPv4 host addresses?
A) 254
B) 256
C) 255
D) 253
Q59. Which Wi■Fi standard first introduced 5 GHz widely?
A) 802.11b
B) 802.11g
C) 802.11n
D) 802.11a
Q60. HTTPS provides:
A) Confidentiality & integrity
B) Only confidentiality
C) Only authentication
D) Only integrity
Q61. Which tool is used to trace route to a host?
A) ping
B) traceroute
C) netcat
D) arp
Q62. Which method is idempotent in HTTP?
A) POST
B) PATCH
C) PUT
D) CONNECT
Q63. NAT primarily translates:
A) MAC addresses
B) Private to public IPs
C) Ports to protocols
D) Hostnames to IPs
Q64. What does DNS stand for?
A) Data Name System
B) Domain Name System
C) Distributed Naming Service
D) Domain Naming Service
Q65. TLS handshake uses:
A) Symmetric only
B) Asymmetric only
C) Both asymmetric & symmetric
D) No encryption
Q66. Which HTTP header carries a JWT most commonly?
A) Authorization
B) Cookie
C) WWW-Authenticate
D) X-Token
Q67. Which command creates a new Git branch and switches to it?
A) git branch new
B) git checkout -b new
C) git switch
D) git init new
Q68. To combine two commits into one, you can:
A) git stash
B) git rebase -i
C) git pull
D) git fetch
Q69. CI stands for:
A) Continuous Integration
B) Constant Iteration
C) Code Inspection
D) Continuous Innovation
Q70. Dockerfile instruction to set base image:
A) RUN
B) FROM
C) BASE
D) IMAGE
Q71. Kubernetes object that runs a container is:
A) Service
B) Pod
C) ConfigMap
D) Ingress
Q72. Which tool manages infrastructure as code?
A) Terraform
B) Ansible
C) Jenkins
D) Grafana
Q73. To revert a file to last commit:
A) git reset --hard HEAD -- file
B) git checkout -- file
C) git restore --staged file
D) git rm file
Q74. Artifact of a build pipeline usually means:
A) Source code
B) Compiled output/package
C) Git branch
D) Log file
Q75. Which command shows a one-line commit history?
A) git show
B) git status
C) git log --oneline
D) git diff
Q76. YAML stands for:
A) Yet Another Markup Language
B) YAML Ain't Markup Language
C) Your Awesome Markup Language
D) Yielded Abstract Markup Language
Q77. Unit tests should primarily test:
A) External services
B) Individual small units
C) Entire subsystems
D) UI styling
Q78. TDD cycle is:
A) Write tests → Refactor → Code
B) Code → Test → Refactor
C) Red → Green → Refactor
D) Design → Implement → Test
Q79. Mock objects are used to:
A) Speed up compilation
B) Replace real dependencies
C) Generate documentation
D) Run UI tests
Q80. What is code coverage?
A) % of code exercised by tests
B) # of tests
C) Build success rate
D) Bug count
Q81. Static analysis tools detect:
A) Runtime memory leaks only
B) Style, bugs, vulnerabilities
C) UI issues only
D) Network latency
Q82. Which testing validates end-to-end flows?
A) Unit
B) Integration
C) System/Acceptance
D) Mutation
Q83. Mutation testing evaluates:
A) Performance
B) Security
C) Test suite strength
D) Scalability
Q84. Equivalence partitioning is a:
A) Black-box test design technique
B) White-box technique
C) Refactoring pattern
D) Agile ceremony
Q85. Which model is the linear sequential model?
A) Spiral
B) Waterfall
C) V-Model
D) Agile
Q86. User stories primarily capture:
A) Business value from user's view
B) DB schema
C) UML class diagrams
D) Server configs
Q87. A use-case diagram shows:
A) Class inheritance
B) System interactions with actors
C) Deployment topology
D) Data flow only
Q88. Which design principle is 'program to an interface, not an implementation'?
A) KISS
B) YAGNI
C) Dependency Inversion
D) Open/Closed
Q89. 'Single Responsibility' means:
A) One reason to change
B) One public method
C) One class per file
D) One dependency
Q90. Which metric approximates code complexity?
A) Cyclomatic complexity
B) Lines of code only
C) Comment density
D) Latency
Q91. A REST resource should be identified by:
A) RPC method
B) URL/URI
C) Database table
D) Port number
Q92. Idempotent HTTP methods can be:
A) Repeated without side effects
B) Cached forever
C) Used only with GET
D) Unsafe
Q93. In Scrum, who prioritizes the Product Backlog?
A) Scrum Master
B) Product Owner
C) Developers
D) Stakeholders
Q94. A spike in Agile is:
A) UI mockup
B) Short time-boxed research
C) Release candidate
D) Bug fix
Q95. Which diagram shows object lifelines over time?
A) Sequence diagram
B) Class diagram
C) Component diagram
D) State diagram
Q96. Twelve-Factor App recommends storing config in:
A) Code
B) Environment variables
C) Database
D) Binary files
Q97. Which pattern adds behavior to objects dynamically?
A) Strategy
B) Decorator
C) Observer
D) Factory
Q98. In microservices, a common anti-pattern is:
A) Database per service
B) Shared database for services
C) API gateway
D) Service discovery
Q99. Which field in JWT is meant for claims?
A) iss only
B) payload
C) header
D) signature
Q100. What does SOLID 'O' stand for?
A) Object cohesion
B) Open/Closed Principle
C) Optimization
D) Object responsibility
Answer Key
Q1: D
Q2: A
Q3: B
Q4: A
Q5: B
Q6: B
Q7: A
Q8: A
Q9: C
Q10: C
Q11: C
Q12: D
Q13: B
Q14: B
Q15: C
Q16: B
Q17: D
Q18: B
Q19: B
Q20: C
Q21: B
Q22: A
Q23: A
Q24: A
Q25: B
Q26: B
Q27: B
Q28: B
Q29: C
Q30: A
Q31: B
Q32: C
Q33: A
Q34: A
Q35: A
Q36: C
Q37: B
Q38: B
Q39: B
Q40: D
Q41: A
Q42: B
Q43: D
Q44: A
Q45: B
Q46: B
Q47: B
Q48: B
Q49: B
Q50: D
Q51: C
Q52: B
Q53: C
Q54: D
Q55: C
Q56: C
Q57: A
Q58: A
Q59: D
Q60: A
Q61: B
Q62: C
Q63: B
Q64: B
Q65: C
Q66: A
Q67: B
Q68: B
Q69: A
Q70: B
Q71: B
Q72: A
Q73: B
Q74: B
Q75: C
Q76: B
Q77: B
Q78: C
Q79: B
Q80: A
Q81: B
Q82: C
Q83: C
Q84: A
Q85: B
Q86: A
Q87: B
Q88: C
Q89: A
Q90: A
Q91: B
Q92: A
Q93: B
Q94: B
Q95: A
Q96: B
Q97: B
Q98: B
Q99: B
Q100: B

You might also like