Home / Rakesh Yadav / Programming MCQs Solution

Programming Portal Solution

You will find all Programming Portal MCQs whose solution is updated by Rakesh Yadav

Q. Which component in Hadoop is responsible for actual data storage?

Q. What is the main advantage of YARN over classic MapReduce?

Q. Which one is true about data locality in Hadoop?

Q. How does Hadoop ensure data integrity?

Q. Which component splits input data and assigns it to mappers?

Q. Which type of data is best suited for Hadoop processing?

Q. Which of the following is not a core component of Hadoop?

Q. Which Apache project helps in interactive SQL querying on Hadoop?

Q. Which command is used to list files in an HDFS directory?

Q. Which Hadoop component is responsible for managing resource usage per job?

Q. How does Hadoop handle hardware failure?

Q. Which of the following is a distributed computing framework in Hadoop?

Q. In which directory is the HDFS NameNode metadata stored?

Q. Which component in Hadoop is responsible for task execution in MapReduce?

Q. Which of these is a valid HDFS file permission string?

Q. What is the main benefit of using large block sizes in HDFS?

Q. What is the maximum size of a block in HDFS?

Q. Which command is used to delete a file in HDFS?

Q. What happens when the replication factor of a file is increased in HDFS?

Q. What does Django use to store session data by default?

Q. Which command is used to run the Django test server?

Q. Which field type should you use for boolean values?

Q. Which model field is suitable for a fixed set of choices?

Q. Which Django component is responsible for URL routing?

Q. Which signal is triggered after a model is saved?

Q. Which method retrieves all objects from a Django model?

Q. Which file lists installed Django apps?

Q. What is the output of str() method in a Django model?

Q. Which template tag is used to load a custom template filter?

Q. Which view is best for showing object detail using a primary key?

Q. Which of these is a valid middleware component?

Q. Which class-based view is used for displaying a list of objects?

Q. What type of file is used to define Django database migrations?

Q. Which setting defines the list of valid hosts for your Django app?

Q. Which field is best for storing long text in Django?

Q. Which template tag is used for looping over items?

Q. Which of the following is NOT a valid Django template filter?

Q. What does the values() method return in a queryset?

Q. Which decorator is used to restrict access to authenticated users?

Q. What is the use of Django's admin site?

Q. What is the default port used by Django development server?

Q. How do you display messages to users in Django?

Q. Which function returns a redirect response in Django?

Q. What is the purpose of csrf_token in templates?

Q. What does request.user.is_authenticated return?

Q. Which middleware handles user authentication in Django?

Q. What does Meta ordering do in a Django model?

Q. How do you import the render function in views?

Q. Which of these is NOT a valid HTTP method handled in Django views?

Q. Which statement is true about null and blank in Django?

Q. What does the blank attribute do in a Django model field?

Q. Which command lists all available Django management commands?

Q. Which function is used to get a model object or return 404 if not found?

Q. Which field automatically updates to the current date every time the model is saved?

Q. How do you access form.cleaned_data in Django?

Q. Which of the following is a valid template file extension in Django?

Q. How does Django identify each model instance uniquely?

Q. Which command is used to generate migrations in Django?

Q. Which Django feature allows creating database tables from models?

Q. Which setting in Django controls whether debug information is shown?

Q. Which of the following can be used to serve static files in development?

Q. What command is used to check for problems in your Django project?

Q. Which tag in Django templates is used for conditionals?

Q. Which of the following is used for reverse URL resolution in Django templates?

Q. How do you add custom management commands in Django?

Q. Which keyword in Meta class defines database table name?

Q. What does the name argument in path() function specify?

Q. What is the role of the apps.py file in a Django app?

Q. Which tag is used to comment code in Django templates?

Q. What is a slug in Django?

Q. Which function renders templates in Django?

Q. What does the objects attribute in Django models provide?

Q. How do you include another URLconf in Django?

Q. Which is not a valid form field in Django?

Q. Which database is configured by default in Django settings?

Q. Which function is used to create a superuser in Django?

Q. What does Django use to protect against CSRF attacks?

Q. Which class is used to create a form from a model?

Q. Which decorator is used to create a login-required view?

Q. Which Django field is used to store large text?

Q. What does ORM in Django stand for?

Q. In Django, where are templates typically stored?

Q. Which function is used to return an HTML response in Django?

Q. Which HTTP status code is returned for a successful form submission?

Q. Which command creates a new Django project?

Q. Which built-in Django middleware is used for managing sessions?

Q. What does the context dictionary in a Django view do?

Q. Which method in Django class-based views is used to handle GET requests?

Q. Which command is used to apply the latest migrations?

Q. Which field is used for auto-incrementing primary key in Django?

Q. Which model method deletes an object from the database?

Q. Which is not a valid HTTP status code in Django HttpResponse?

Q. Which HTTP method is typically used to submit forms?

Q. What does makemigrations do?

Q. Which file is required to treat a directory as a Python package in Django?

Q. Which function is used to define URL patterns in Django?

Q. What does the collectstatic command do?

Q. Which template tag is used for conditionals in Django templates?

Q. What is the output of the reverse() function in Django?

Q. Which decorator is used with function-based views to allow only staff users?

Q. How do you register a model to the Django admin?

Q. Which of the following is not a valid Django field?

Q. Which tag in Django template is used to add static files?

Q. Which field type is used to store email addresses in Django?

Q. What is the purpose of __str__ method in Django models?

Q. What does the Meta class inside a Django model define?

Q. Which method returns a single object or raises an exception if it doesn't exist?

Q. Which field would you use to store boolean values in a Django model?

Q. Which management command is used to show SQL for a migration?

Q. Which command is used to create a new Django app?

Q. What is the default name of the configuration file that contains Django settings?

Q. Which field type allows selection from a list of choices?

Q. Which setting controls where uploaded media files are stored?

Q. Which template tag is used to display variables in Django?

Q. Which field is used to store large text in Django models?

Q. Which method is used to filter objects with multiple conditions?

Q. Which class-based view is used to display a list of objects?

Q. Which command creates a superuser in Django?

Q. What does the get_object_or_404 function do?

Q. Which option defines a model field that automatically adds the current timestamp on creation?

Q. Which Django file is executed to start the development server?

Q. Which database is set as default in a new Django project?

Q. Which attribute of the HttpRequest object contains GET parameters?

Q. What is the purpose of csrf_token in Django forms?

Q. Which of these is a valid template inheritance structure in Django?

Q. Which keyword argument is used in ForeignKey to specify cascading delete?

Q. Which function is used to render templates in Django views?

Q. Which ORM method returns a QuerySet of all records?

Q. Which built-in Django class is used to create HTML forms from models?

Q. What does the 'blank=True' option do in Django model fields?

Q. Which method on a model saves the object to the database?

Q. Which decorator is used to restrict access to logged-in users only?

Q. Which middleware component handles session management in Django?

Q. Which field is automatically added by Django when no primary key is specified?

Q. Which setting in Django is used to enable debugging information?