C MCQs - 11
What is the time complexity of the bubble sort algorithm used in the provided code? a) O(n) b) O(n log n) c) O(n^2) d) O(lo...
What is the time complexity of the bubble sort algorithm used in the provided code? a) O(n) b) O(n log n) c) O(n^2) d) O(lo...
What will be the output of the following code snippet? #include <stdio.h> int main() { int i = 0; for...
What will be the output of the following code snippet? #include <stdio.h> int main() { int x = 0; whi...
What will be the output of the following code snippet? #include <stdio.h> int main() { int i = 0; for...
What is the output of the following code? #include <stdio.h> int main() { int arr[] = {1, 2, 3, 4, 5};  ...
Which of the following is true regarding the sizeof operator in C? a) It is a preprocessor directive b) It returns the size of a variable ...
Which statement is used to dynamically allocate memory for an array in C? a) new b) malloc c) allocate d) array_alloc Answer: b) m...
What does the fprintf() function do in C? a) Reads formatted data from a file b) Writes formatted data to a file c) Reads formatted data...
What will be the output of the following code? #include <stdio.h> int main() { int x = 5; int y = 10;...
What is the output of the following code snippet? int i = 5; printf("%d\n", ++i); a) 5 b) 6 c) Undefined behavior d) Comp...
What does the sizeof operator return in C? a) Size of a variable in bytes b) Size of a datatype in bytes c) Size of a pointer in bytes ...
Which of the following code snippets demonstrates how to define a route with a middleware in Laravel? Route::get('/admin/dashboard'...
Which of the following code snippets demonstrates how to define a route group in Laravel? Route::middleware(['auth'])->group(func...
Which of the following code snippets demonstrates how to define a route with a wildcard parameter in Laravel? Route::get('/posts/{post}&...
Which of the following code snippets demonstrates how to define a middleware in Laravel? class VerifyAge { public function h...
Which of the following code snippets demonstrates how to define a route in Laravel? Route::get('/dashboard', function () { return vi...
What is the purpose of Laravel's php artisan make:observer command? A) To create a new database observer B) To create a new controll...
Which of the following is NOT a valid method to define a route parameter in Laravel? A) {parameter} B) {parameter?} C) {parameter:in...
Which command is used to create a migration file in Laravel with a specific table name and columns? A) php artisan make:migration create_tab...
Which artisan command is used to clear the application cache in Laravel? A) php artisan cache:clear B) php artisan clear:cache C) ph...