Home / Kanak Sharma / Programming MCQs Solution

Programming Portal Solution

You will find all Programming Portal MCQs whose solution is updated by Kanak Sharma

Q. Which Laravel file defines scheduled tasks?

Q. Which Laravel feature schedules tasks?

Q. Which Laravel command runs queued jobs?

Q. Which Laravel feature handles background jobs?

Q. Which Eloquent method deletes a record?

Q. Which Eloquent method returns first matching record?

Q. Which Eloquent method finds a record by primary key?

Q. Which Eloquent method retrieves all records?

Q. Which Laravel ORM is used for database operations?

Q. Which Blade syntax outputs raw HTML?

Q. Which Blade directive escapes output?

Q. Which Blade directive is used to loop through data?

Q. Which Blade directive is used for conditional statements?

Q. Which middleware provides CSRF protection?

Q. Which Laravel feature handles HTTP request filtering?

Q. Which Laravel method returns a view?

Q. Which Laravel command creates a migration?

Q. Which Laravel command creates a controller?

Q. Which Laravel file defines API routes?

Q. Which Laravel file defines web routes?

Q. Which Composer file defines project dependencies?

Q. Which PHP feature allows dependency injection?

Q. Which keyword refers to the current class?

Q. Which PHP feature allows late static binding?

Q. Which PHPUnit annotation runs after each test?

Q. Which PHPUnit annotation runs a method before each test?

Q. Which PHPUnit method checks strict equality?

Q. Which PHPUnit method checks equality of values?

Q. Which PHP extension is commonly used for unit testing?

Q. Which design pattern defines one-to-many dependency?

Q. Which design pattern allows behavior to be added dynamically?

Q. Which design pattern provides an interface for creating objects?

Q. Which design pattern ensures a class has only one instance?

Q. Which magic method is called when invoking inaccessible methods?

Q. Which magic method is called when an object is converted to string?

Q. Which keyword allows accessing parent class methods?

Q. Which keyword is used to implement an interface?

Q. Which access modifier allows access only within the same class?

Q. Which OOP principle restricts direct access to class data?

Q. Which PHP interface allows count() to work on objects?

Q. Which PHP interface allows objects to be accessed like arrays?

Q. Which PHP interface must be implemented to use foreach with objects?

Q. Which PHP feature enforces strict type checking?

Q. Which PHP function measures script execution time in microseconds?

Q. Which php.ini directive enables OPcache?

Q. Which PHP OPcache feature improves performance?

Q. Which PHP function outputs JSON with correct headers?

Q. Which PHP function reads raw JSON input from request body?

Q. Which PHP function sends a raw HTTP header?

Q. Which PHP function sets HTTP response status code?

Q. Which HTTP method is used to partially update a resource?

Q. Which HTTP method is used to update an entire resource?

Q. Which HTTP status code indicates forbidden access?

Q. Which HTTP status code indicates unauthorized access?

Q. Which HTTP status code indicates a bad request?

Q. Which HTTP status code represents successful resource creation?

Q. Which PHP function converts JSON into an associative array?

Q. Which PHP function converts an array or object into JSON?

Q. Which keyword prevents a method from being overridden?

Q. Which keyword prevents a class from being inherited?

Q. Which PHP feature helps reuse code across classes?

Q. Which PHP filter removes unsafe characters from a string?

Q. Which PHP function generates a random string of bytes?

Q. Which PHP function generates a random integer securely?

Q. Which PHP superglobal contains uploaded file data?

Q. Which HTTP method is considered safest for retrieving data?

Q. Which PHP function removes HTML and PHP tags?

Q. Which PHP function prevents Cross-Site Scripting (XSS)?

Q. Which PHP function hashes a password securely?

Q. Which method fetches all rows from a PDO result set?

Q. Which PDO fetch mode returns an object?

Q. Which PDO fetch mode returns an associative array?

Q. Which PHP extension is recommended for secure database access?

Q. Which PHP function escapes HTML characters?

Q. Which PHP function joins array elements into a string?

Q. Which PHP function removes duplicate values from an array?

Q. Which PHP function flips array keys and values?

Q. Which PHP function reverses an array?

Q. Which PHP function pads an array to a specific length?

Q. Which PHP function fills an array with values?

Q. Which PHP function creates an array using one array for keys and another for values?

Q. Which PHP function applies a callback to each array element without changing it?

Q. Which PHP function filters array elements using a callback?

Q. Which PHP function reduces an array to a single value?

Q. Which PHP function creates a new array from callback results?

Q. Which PHP keyword is used to define an arrow function?

Q. Which PHP feature provides shorter syntax for anonymous functions?

Q. Which PHP feature allows accessing external variables inside anonymous functions?

Q. Which PHP keyword is used to define an anonymous function?

Q. Which operator is used to unpack an array into arguments?

Q. Which PHP feature allows a function to accept unlimited arguments?

Q. Which PHP function parses a date/time string into a timestamp?

Q. Which PHP function formats a local date/time?

Q. Which PHP function gets the Unix timestamp?

Q. Which PHP function delays execution in microseconds?

Q. Which PHP function delays execution for a number of seconds?

Q. Which PHP function compacts variables into an array?

Q. Which PHP function extracts variables from an array?

Q. Which PHP function counts occurrences of values in an array?

Q. Which PHP function searches a value and returns its key?

Q. Which PHP function checks if a value exists in an array?

Q. Which PHP function returns the key of the current array element?

Q. Which PHP function moves the array pointer backward?

Q. Which PHP function advances the internal array pointer?

Q. Which PHP function returns the current element of an array?

Q. Which PHP function resets the internal pointer of an array?

Q. Which PHP function returns the last element of an array without removing it?

Q. Which PHP construct is faster than calling a function?

Q. What will be the output of: var_dump(false === 0);

Q. What will be the output of: var_dump(false == 0);

Q. Which PHP function checks if a variable is empty?

Q. Which PHP function checks if a method exists in a class?

Q. Which PHP function changes the current directory?

Q. Which PHP function gets the current working directory?

Q. Which PHP superglobal stores server and execution environment info?

Q. Which PHP function retrieves environment variables?

Q. Which PHP function removes a directory?

Q. Which PHP function creates a directory?

Q. Which PHP function deletes a file?

Q. Which PHP function writes data to a file?

Q. Which PHP function reads the entire file into a string?

Q. Which PHP function checks if a path is a directory?

Q. Which PHP function checks if a path is a regular file?

Q. What will be the output of: echo 5 ?? 10;

Q. Which PHP operator is used for null coalescing assignment?

Q. Which PHP function checks if a string contains only digits?

Q. Which PHP function checks if a variable is an integer?

Q. Which PHP function checks whether a variable is numeric?

Q. The if-elseif-else statement in C programming is used?

Q. Which of these if...else block syntax is correct?

Q. Can the else statement exist without the if statement in C?

Q. Which statement is required to execute a block of code when the condition is false?

Q. When the condition of if statement is false, the flow of code will ___.

Q. The if statement is a conditional statement?

Q. What is the correct syntax of if statement in C program?

Q. Ternary operator in C programming is ___.

Q. Which of the following is a true value in C programming?

Q. Decision making in the C programming language is ___.

Q. Which of the following are valid decision-making statements in C?

Q. What is the name of "&" operator in C?

Q. Which C keyword is used to extend the visibility of variables?

Q. What will be the output of the following C code?

Q. What will be the output of the following C code?

Q. What will be the output of the following C code?

Q. Increment (++) and decrement (--) are the ___ operators in C?

Q. What will be the output of the following C code?

Q. What will be the output of the following C code?

Q. What will be the output of the following C code?

Q. What will be the output of the following C code?

Q. Which operator is used to find the remainder of two numbers in C?

Q. Which is correct with respect to the size of the data types in C?

Q. Which is/are the sign qualifier(s) in C language?

Q. How many types of qualifiers are there in C language?

Q. What is the correct syntax to declare a variable in C?

Q. How many byte(s) does a short type take in C?

Q. The short type represents ___

Q. Which is the correct format specifier for double type value in C?

Q. What is the difference between float and double in C?

Q. For which type, the format specifier "%i" is used?

Q. How many byte(s) does a char type take in C?

Q. Which are the fundamental data types in C?

Q. Which is/are the disadvantage(s) of C language?

Q. What is the extension of a C language source file?

Q. How many whitespace characters are allowed in C language?

Q. In which version of C language, the C++ Style comment (//) are introduced?

Q. ___ is an informal name for ISO/IEC 9899:1999, a past version of the C programming language standard?

Q. Which is not a valid keyword in C language?

Q. C language is a ___.

Q. What simplifies the text formatting process if the same formatting is required in multiple locations?

Q. With which view can you see how the text and graphics will appear on the printed page?

Q. By default, MS Word automatically formats each header of a contents table under the form __________

Q. What functionality is used to monitor all document changes?

Q. The ability to combine a name and addresses with a standard document is called

Q. What MS-Word language does it use to create macros?

Q. The “minimum zoom” is up to _______ in MS Word

Q. The “maximum zoom” is up to ______ in MS Word