NSCT PAST PAPERS AND SYLLABUS
فری تیاری کیلے وٹس ایپ
گروپ جوائن کریں
Click here
چار آپشن میں سے کسی ایک پر کلک کرنے سے جواب سرخ ہو جائے گا۔
- var arr = (1 2 3);
- var arr = [1 2 3];
- var arr = {1 2 3};
- var arr = <1 2 3>;
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
In JavaScript, arrays are declared using square brackets [ ].
Each element inside the brackets is separated by a comma.
Parentheses ( ), curly braces { }, and angle brackets < > are not used for arrays.
Arrays can store numbers, strings, objects, or even other arrays.
Example: var arr = [10, 20, 30]; creates an array of three numbers.
- MySQL
- MongoDB
- Oracle
- SQL Server
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
MongoDB is a NoSQL document database that stores data in JSON-like documents.
It is ideal for large volumes of unstructured or semi-structured data like logs.
Unlike SQL databases (MySQL, Oracle, SQL Server), it does not require a fixed schema.
- Laravel
- React
- Django
- Node.js
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Laravel is a modern PHP framework for building web applications.
It provides MVC architecture, routing, and built-in security features.
React and Node.js are JavaScript-based, and Django is Python-based.
- Learning from labeled data
- Learning patterns from unlabeled data
- Learning by reinforcement
- Learning via rules only
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Unsupervised learning finds patterns or structures in data without labeled outputs.
Common tasks include clustering and dimensionality reduction.
Supervised learning uses labeled data to predict outcomes.
Reinforcement learning is based on rewards and penalties, not unlabeled data.
Unsupervised learning is useful for exploring data and discovering hidden relationships.
- Client-side rendering happens on the server
- Server-side rendering happens in the browser
- Client-side rendering happens in the browser; server-side happens on the server
- Both are identical in performance
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Client-side rendering (CSR) means the browser builds the page using JavaScript after receiving data.
Server-side rendering (SSR) means the server sends a fully rendered HTML page to the browser.
CSR can reduce server load but may slow initial page load.
SSR improves SEO and faster initial page display.
- Client-side problem
- Server-side problem
- Network congestion or routing issue
- Deadlock
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
If a device can send data but never receives a reply, the problem is likely in the network path.
Causes include network congestion, faulty routers, or incorrect routing tables.
It is not necessarily a client-side or server-side problem if both are working correctly.
Deadlock applies to multithreading, not networking.
Troubleshooting usually involves checking connectivity, routes, and packet flow.
ملٹی تھریڈنگ میں ڈیڈلاک کیا ہے؟
- When threads finish too quickly
- When threads block each other permanently while waiting for resources
- When threads execute sequentially
- When threads share data safely
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
A deadlock occurs when two or more threads wait indefinitely for resources held by each other.
None of the threads can proceed, causing the program to freeze.
Deadlocks often happen when threads acquire multiple locks in different orders.
Proper resource management and lock ordering help prevent deadlocks.
Deadlocks are a key concern in multithreading and concurrent programming.
- 3
- 5
- 7
- 2
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
The initial value of x is 5.
The if condition x > 3 is true.
The statement x += 2 is executed.
The else block is skipped.
Final output is 7.
- To encrypt data
- To prevent multiple threads from accessing shared resources simultaneously
- To speed up execution
- To handle recursion
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
A mutex (mutual exclusion) lock ensures that only one thread can access a shared resource at a time.
It prevents race conditions, where multiple threads modify data simultaneously.
Threads must acquire the mutex before using the resource and release it afterward.
Mutexes are commonly used in multithreading and concurrent programming.
Proper use of mutexes ensures data consistency and program stability.
- Matplotlib
- NumPy
- Seaborn
- Scikit-learn
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
NumPy is a Python library for numerical computation and array operations.
It provides fast mathematical functions for large datasets.
Many machine learning libraries like TensorFlow and Scikit-learn use NumPy arrays internally.
Matplotlib and Seaborn are for visualization, not computation.