100 TOP Real Time Magento Multiple choice Questions and Answers pdf download

Read the most frequently asked 100 top Magento multiple choice questions and answers PDF for freshers and experienced

Magento Objective type Questions and Answers List


Magento Interview Questions

Magento Multiple choice Questions

Is it possible to integrate multiple domain with different store in single Magento installation?
A. Yes
B. No
Ans: A

What does ORM stand for in Magento?
A. Object Relational Mapping
B. Objective Relative Mapping
C. Optional Relational Mapping
D. Objective Resource Mapping
E. Object Relation Maps
Ans: A
The __________ holds the whole product configuration and is used as a compact record to move a product from one list to another.
A. buyRequest
B. stopRequest
C. holdRequest
D. sellRequest
Ans: A

What type of Magento class is an API resource?
A. Resource model
B. Controller
C. Helper
D. Model
Ans: D

When creating an attribute, which of the following catalog input types can be used in layered navigation?
A. Date
B. Yes/No
C. Price
D. All of the above
E. None of the above
Ans: C
A custom frontend controller will extend which one of the following classes?
A. Mage_Adminhtml_Controller_Action
B. Mage_Core_Controller_Varien_Front
C. Mage_Core_Controller_Abstract
D. Mage_Core_Controller_Front_Action
Ans: D
When changes are made to more than one of a collection’s items using “setData(‘some’, ‘value’)”, which of the following methods will save the changes in the collection?
A. $collection->save()
B. $collection->saveItems()
C. $collection->saveAll()
D. $collection->saveAllItems()
Ans: A
True or False? Changes made to the product option array will NOT be saved by the item.
A. False
B. True
Ans: B
When an order is placed by Credit Card, when does the payment gateway capture the money?
A. Upon Shipment
B. Upon Invoice
C. When Customer Enters the Payment Information
D. When the shipment email gets sent
Ans: B
Assume you have three models A, B and C. Both A and B extend C. Assume C contains a method that you are going to change in both A and B. How can you change the method using Magento class rewrites.
A. Rewrite the method using the xpath global/models/_YOUR_MODULE_/rewrite/C/_METHOD_
B. You must rewrite both A and B using the xpaths global/models/_MODULE_/rewrite/A and global/models/_MODULE_/rewrite/B
C. You must change that method directly in C
D. Rewrite class C using the xpath global/models/_MODULE_/rewrite/C
Ans: B
How will you add/remove content from core’s system.xml file?
A. You can do that by overriding system.xml configuration
B. You can do that by modifying system.xml configuration
C. (none of these answers are correct)
D. You can do that by creating system.xml configuration
Ans: A

These are blocks created for the sole purpose of assigning visual structure to a store page such as header, left column, main column and footer.
A. Fallback Blocks
B. Structural Blocks
C. Content Blocks
D. Frontend Blocks
Ans: B
How are themes grouped together into design packages?
A. Logically
B. Randomly
C. Related
D. Unrelated
Ans: A
By default Magento uses 4 main sales documents. What are they, in order of when they are created?
A. Orders, Invoices, Creditmemos, Transactional Emails
B. Quotes, Orders, Creditmemos, Transactions
C. Transactions, Payments, Orders, Creditmemos
D. Quotes, Orders, Invoices, Creditmemos
Ans: D
If you sell different products in a bundle, Where do you add a new options to a bundle product?
A. The Associated Products section of the Product Edit Page
B. From the products management grid
C. The Catalog section of the System Configuration
D. The Bundle Products section of the Product Edit Page
Ans: D
A ________ can hold products with full, partial, or no configuration.
A. shopping cart
B. wishlist
C. banner
D. checklist
Ans: B

How to include CMS block in template file(.phtml)
A. $this->getLayout()->setBlockId(“static/block/id”)->createBlock(“cms_block”)->toHTML();
B. $this->getLayout()->createBlock(“cms/block”)->setBlockId(“static_block_id”)->toHTML();
C. $this->getLayout()->setBlockId(“static_block_id”)->createBlock(“cms/block”)->toHTML();
D. $this->getLayout()->createBlock(“cms_block”)->setBlockId(“static/block/id”)->toHTML();
Ans: B
What actions are necessary to make that would enable the profiler.
A. Customer – Manage Customers
B. System Configuration – Developer Tab – Debug/Profiler set Yes and then [your-website]/index.php uncomment Varien_Profiler::enable();
C. System Menu – Permissions – Debug/Profiler set Yes and then [your-website]/index.php uncomment Varien_Profiler::enable();
D. System – Manage Stores – Debug/Profiler set Yes and then [your-website]/index.php uncomment Varien_Profiler::enable();
Ans: B
In the context of a template file, which is the proper method of translating the following string: “Buy a “.$product->getName().” today!”
A. Mage::translate(“Buy a “.$product->getName().” today!”);
B. Mage::helper(‘catalog’)->__(‘Buy a {{product}} today!’, array(‘product’ => $product->getName());
C. $this->__(“Buy a {$product->getName()} today!”);
D. $this->__(‘Buy a %s today!’, $product->getName());
Ans: D

From what page can an admin reset a customers password?
A. Customer Menu, Security and Access Management
B. Admin Menu, Customer Password Reset
C. Permissions and Access from the System Menu
D. Customer Management, Account Information section
Ans: D
To write a custom SQ: query in Magento is very easy, we just need to call:
A. $db = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $result=$db->run_query(“SELECT * FROM PCDSTable”);
B. $db = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $result=$db->query(“SELECT * FROM PCDSTable”);
C. $db = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $result=$db->fetch_query(“SELECT * FROM PCDSTable”);
D. $db = Mage::get_configData(‘core/resource’)->getConnection(‘core_write’); $result=$db->run_query(“SELECT * FROM PCDSTable”);
Ans: B
Which one of the following is a possible return value type of Mage::getConfig()->getNode()?
A. array
B. integer
C. string
D. object
Ans: D
If an order has been created and is in pending state, what is the appropriate action that needs to be taken, for the to progress into the processing state?
A. The order must be authorized
B. The order must be invoiced
C. The order must be shipped
D. The order must be cancelled
Ans: B

What is a Composite Product?
A. The name of the feature that allows you to manipulate product features before going live
B. (none of these are correct)
C. The first 10 products added to any store
D. The name for a collection of already existing product types that allow a shopper to configure a product before buying it
Ans: D
For items where inventory is not tracked, what is the setting to shut inventory management off?
A. Category Management, under the Catalog Menu
B. Manage Stock, under Inventory section
C. Set the price to 0
D. Set the order increment to 0
Ans: B
When creating a new category to appear on the category navigation block, what are the first two steps?
A. Choose the Root Category, and Add subcategory
B. Change the category anchor settings, and save the category tree
C. Create a virtual product, and add it to the category tree
D. Add a new CMS static block within the category navigation system, and insert it into the category page
Ans: A
In Magento a Coupon is also known as?
A. Physical Item
B. Bundled Product
C. Shopping Cart Price Rule
D. Promotional Chart
Ans: C
In order to be Refunded Online, what sales document must be attached?
A. CMS Page
B. Sales Order
C. Transactional Email
D. Invoice
Ans: D
Where can you find the design configuration tab?
A. System/Category/Configuration/Design tab
B. System/Catalog/Category/Design tab
C. System/Configuration/Design tab
D. System/Configuration/Category/Design tab
Ans: C
Which of the following are frontend blocks with a predefined set of configuration options?
A. Widgets
B. Apps
C. Cells
D. Tabs
Ans: A

What is the setting that determines that product will show on the search page and not on the category listing?
A. Product Inventory Status
B. Product Visibility
C. Product Status
D. Product Attribute Manager
Ans: B
What is the difference between Mage::getModel() and Mage::getSingleton()?
A. Mage::getModel() creates an object of model class while Mage::getSingleton() creates an object of singleton class
B. Mage::getModel() can be called anywhere while Mage::getSingleton can be called only at specific places.
C. Mage::getModel() creates a new object every time it is being called while Mage::getSingleton() check for the existing object. If it exists, it returns that object otherwise creates a new one
D. Mage::getModel() and Mage::getSingleton() both creates an object of model class. So, there is no difference
Ans: C
What is a function of Layouts in Magento?
A. They define both the structural and content blocks.
B. They inform Magento how and where to connect the Structural and Content blocks up.
C. Both of these
Ans: C
The marketing guy wants to use a custom url for one of the products, just for a temporary time promotion. What do you use?
A. Add a URL Rewrite
B. Create a new producty category
C. Change Product Information
D. (none of these)
Ans: A
When is it acceptable to edit app/code/core/Mage files?
A. When I find a bug in the code
B. When I would like to change Mage modules
C. Never
D. When there is a conflict with an off the shelf extension
Ans: C
The design team wants to show what the t-shirts are made on the product page. What are 2 ways to accomplish this?
A. Add the fabric composition to the product description, or create a new product attribute
B. Change the names of all the bundled products
C. Add a URL Rewrite for the Fabric Composition
D. Use the composition directive {{composition id=”identifier”}}
Ans: A
When should you edit files in the base template?
A. When you inherit a project from another developer
B. When the file does not exist in the theme template
C. When there is a svn or git conflict on your files
D. Never
Ans: D
When creating a new product, what is the first thing you must choose?
A. Whether the product is visble in the Catalog
B. The Product SKU
C. Product Type, and Attribute Set
D. The product price
Ans: C
How does Magento determine the visual representation of each building block of a page view?
A. The <building_block> tag.
B. The <block> tag.
C. The <info_block> tag.
D. The <block_representation> tag.
Ans: B
How do you Embed a Static Block in a CMS page?
A. The CMS Page section of the System Configuration
B. Use the block directive {{block id=”block_identifier”}}
C. Call the developer
D. Use the wysiwyg editor
Ans: B
Which code snippet is used to show one category on your front page?
A. {{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” category_id=”4″ template=”catalog/product/list.phtml”}}
B. {{block type=”catalog/product_new” name=”home.catalog.product.new” alias=”product_homepage” template=”catalog/product/new.phtml”}}
C. {{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” template=”catalog/product/list.phtml”}}
D. {{block =”catalog/product_list” name=”home.catalog.list” alias=”homepage”catalog/product/list.phtml”}}
Ans: A
Where is the css and javascript file of your custom theme kept?
A. skin/frontend/default/base
B. design/frontend/default/your_theme
C. design/frontend/default/base
D. skin/frontend/default/your_theme
Ans: D
Customer emails and wants to cancel their order. Bummer. What are the 2 ways you can find the order?
A. The Category or Product Menu
B. Searching Newsletter Subscribers or Choosing a recent discounted product
C. Searching the Sales Order Grid or By pulling up the Customer Info
D. The Magento Configuration Panel or Through the Payment Method
Ans: C
When writing a Magento module which of these files are you likely to create first?
A. Helper/Data.php
B. Block/Template.php
C. Model/Observer.php
D. controllers/IndexController.php
E. etc/config.xml
Ans: E

What is the purpose of a Grouped Product?
A. It is a feature to limit the amount of traffic to a specific product
B. It allows a group of people to purchase a product at the same time
C. It offers a simple way to add multiple related products to the Shopping Cart
D. None of these
Ans: C
True or False? When customers are using the poll feature, only one question will show up at a time.
A. False
B. True
Ans: B
A new product still shows out-of-stock, even though it shows that there are 20 available. Which index should we rebuild?
A. Product Prices
B. Product Flat Data
C. Catalog Product Rewrites
D. Stock Status Index
Ans: D
Which code snippet is used to show products labeled as “new” on your front page?
A. {{block type=”catalog/product_new” name=”home.catalog.product.new” alias=”product_homepage” template=”catalog/product/new.phtml”}}
B. {{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” category_id=”4″ template=”catalog/product/list.phtml”}}
C. {{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” template=”catalog/product/list.phtml”}}
D. {{block =”catalog/product_list” name=”home.catalog.list” alias=”homepage”catalog/product/list.phtml”}}
Ans: A
The store sells a e-book. What product type is used?
A. simple
B. configurable
C. virtual
D. downloadable
Ans: D
What is the setting that determines that an attribute value will show on the product page?
A. Scope
B. Store Label
C. The Visible on Product View Page on Front-end
D. Used for layer navigation
Ans: C
3 main reasons product won’t show on Category page?
A. SKU, Price, Description
B. Price,Status,Visibility
C. Availablity, Status, Visibility
D. Availability,Status,SKU
Ans: C
The store offers a free shipping coupon for orders over $50. The owner wants to change it to order over $75. Where is that done?
A. CMS Static Block Management
B. The Shipping Methods of the System Configuration
C. System Menu, Permission Mangement
D. Promotion Menu, Shopping Cart Price Rule Management
Ans: D
Which of these would be a good use case for a Configurable Product?
A. Downloadable Instructions
B. Computer where each part is customized
C. T-shirt that comes in different sizes and colors
D. Shipping Costs
Ans: C
Where can I find system.log and exception.log debugging log files?
A. application/log
B. log/error
C. var/log/
D. error/log/
Ans: C
What function of Magento that let’s you reuse content in CMS Pages and Email Templates?
A. Catalog Price Rules
B. Custom Error Handlers
C. CMS Static Blocks
D. Category Design Updates
Ans: C
Where can I find system.log and exception.log debugging?
A. log/error
B. log/debug
C. error/log/
D. var/log/
E. application/log
Ans: D
The developer has told you that a theme is ready to use, where do you see what theme is currently in use?
A. Depends on the URL Rewrites
B. The Customer Management Grid
C. The Design Dashboard
D. The design section of the System Configuation
Ans: D
If you have mutliple people that need access to the Magento backend, how do you restrict access to specific users?
A. Magento licensing only allows 2 admin users
B. Magento requires a 3rd party ACL extension to allow multiuser access
C. Magento doesn’t allow mutliple people to be signed on at the same time
D. Magento comes with a Permissions based system that allows definition of users and assigned roles
Ans: D
The store sells a t-shirt that comes in different colors. What product type is used?
A. configurable
B. bundle
C. simple
D. downloadable
Ans: A

Magento allows you to use multiple themes within the same layout and template.
A. True
B. False
Ans: A
True or False? Template contains the PHTML files that contain xHTML markups and any necessary PHP to create logic for visual presentation.
A. True
B. False
Ans: A
What is EAV in Magento?
A. Effective Added Values
B. Entity Art Volumes
C. Entity Allocated Value
D. Entity Allocation Values
E. Entity Attribute Value
Ans: E
Magento has a built in Contact us form. Where do you specify to whom those requests get sent?
A. The Main Dashboard
B. The Customer Info Screen
C. The shipping methods configuration
D. The contacts section of the System Configuation
Ans: D

What is the rule for working with Magento’s base package?
A. Do NOT create a custom theme inside of the base package.
B. Do NOT edit the files in the base package.
C. Both of these
Ans: C
_________ are ways in which Magento distinguishes the array of functionalities in the system and creates a modular way to manage it from both a visual and functional standpoint.
A. Boxes
B. Blocks
C. Tabs
D. Cells
Ans: B
Turns out FEDEX is cheaper for some of the products. Where do we add FEDEX as a choice during checkout?
A. The Main Dashboard
B. The Shipping Methods section of the System Configuration
C. The payment methods configuration
D. The Order Info Screen
Ans: B
Magento has always used fallback logic in rendering themes.
A. True
B. False
Ans: A

What is the correct way to add css and js in magento page?
A. These can be added in PHP block files
B. These can be added directly in phtml files where they are needed
C. These can be added in layout xml file where css and js files can be added in head reference
D. These cannot be added at all
Ans: C
What is the difference between a simple product type and a virtual product type?
A. Virtual Products cannot have a price associated to them
B. Virtual Products can’t be sold in the US
C. Simples can hold inventory, virtual products cannot
D. Simple products have less complex data containers
Ans: C
A customer wants to know if there order went through. Where does an admin go to check on orders?
A. Category Menu
B. Under Coupons and Promotions
C. The Magento Configuration Panel
D. The Sales Order Management Grid
Ans: D
How would you create a page about the magento store for customers to read?
A. Create a virtual product
B. Calling the developer
C. By creating a CMS page
D. Create a bundle product
Ans: C
True or False: Products URL can be created manually.
A. False
B. True
Ans: B
True or False: You can upload particular product on multiple website from one admin.
A. True
B. False
Ans: A
Paypal raised the cost of processing credit cards. Where do you go to remove Paypal as a payment choice?
A. The Payment Methods section of the System Configuration
B. CMS Static Block Management
C. Paypal website, under My Account
D. Magento Caching Engine
Ans: A
If you’re going to take credit cards directly in your Magento store, which of the following items will you need?
A. LAD Certificate
B. WFE Certificate
C. EMS Certificate
D. SSL Certificate
Ans: D

Magento is capable of changing the layout for a single product. What functionality do we employ to make that happen?
A. Custom Layout Update XML
B. Creating a new CMS page
C. Creating a request for design change
D. Create an URL Rewrite
Ans: A
How many fallback steps does Magento provide?
A. 2
B. 3
C. 1
Ans: B
If you have a product that comes in different sizes, Where do you add a new size for the configurable product?
A. The Catalog section of the System Configuration
B. The Associated Products section of the Product Edit Page
C. The CMS Page section of the System Configuration
D. The Bundle Products section of the Product Edit Page
Ans: B
What are the three concepts and tools you need to learn to be a successful designer in Magento?
A. Structural Blocks, Content Blocks, and Layout
B. Structural Blocks, Content Blocks, and Widgets
C. Blocks, Widgets, and Fallback Logic
D. Fallback Logic, Structural Blocks, and Content Rows
Ans: A
A Magento theme is stored in which directory in the Magento file system?
A. Neither App/Design Directory or Skin Directory
B. Skin Directory
C. Both App/Design Directory and Skin Directory
D. App/Design Directory
Ans: C
Where can you find the product page to edit the .phtml file?
A. app/design/frontend/your theme/default/template/catalog/product/new.phtml
B. app/design/frontend/your theme/default/template/catalog/product/view/view.phtml
C. app/design/frontend/your theme/default/template/catalog/product/view.phtml
D. app/design/frontend/your theme/default/template/catalog/product/list.phtml
Ans: C
What is the best way to add xml settings for front of the store?
A. add local.xml file
B. copy and edit xml files from base
C. edit xml files in base
Ans: A
How to add review list on product page of Magento ?
A. < ?php echo $this->getReview(‘product’) ? >
B. < ?php echo $this->getChildHtml(‘reviews’) ? >
C. < ?php echo $this->getProduct(‘reviews’) ? >
Ans: B

True or False: You can not add image in products description.
A. True
B. False
Ans: B
In a fresh installation of native Magento, the email templates are stored in the
A. app/design/email folder
B. email folder of the current theme
C. app/design/base/default/default/template/email folder
D. app/locale/_LOCALE_/template/email folder
Ans: D
What is the purpose of PCI Compliance?
A. It ensures that your servers meet the requirements to keep cardholder information secure
B. It ensures that your servers will not be pushed to capacity
C. It ensures that your servers meet the requirements to prevent SPAM
D. None of these
Ans: A
What are the individual-colored blocks that make up a structural block and represent the true content of a store page?
A. Frontend Block
B. Info Block
C. Fallback Block
D. Content Block
Ans: D

What is the best place to make extension changes for frontend?
A. frontend/default/default
B. frontend/base/default
C. frontend/[current_package]/default
D. (none of these are correct)
Ans: C
Where are the Email Templates managed?
A. Email Templates from the CMS Menu
B. System Configuration, under Templates
C. Transactional email management from System menu
D. The Contacts section of the System Configuration
Ans: C
Because of the complex nature of the product data, there is a process that simplifies the data. What function controls this process?
A. Magento Caching Engine
B. Configuration Caching Object
C. Product Flat Data Indexer
D. Magento Compiler
Ans: C
Which code snippet is used to show ALL products in your catalog on your front page?
A. {{block =”catalog/product_list” name=”home.catalog.list” alias=”homepage”catalog/product/list.phtml”}}
B. {{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” category_id=”4″ template=”catalog/product/list.phtml”}}
C. {{block type=”catalog/product_new” name=”home.catalog.product.new” alias=”product_homepage” template=”catalog/product/new.phtml”}}
D. {{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” template=”catalog/product/list.phtml”}}
Ans: D
Select the correct handle for the Product View page.
A. <view_catalog_product>
B. <catalog_product_view>
C. <catalog_products_view>
D. <catalogs_product_view>
Ans: B
Which of the following is considered to be part of Magento’s backend?
A. Wishlist
B. View Product
C. Shopping Cart
D. General JS architecture
Ans: D
Customer Orders can be created from the Magento Backend. What are the 2 paths an admin user can take to create an order for a customer?
A. From the Customer Management Grid, or from the Customer Management Page
B. From the Frontend Checkout page, or the Customer Management grid
C. From Customer Management page, and from the Sales Order Management grid
D. From the Sales Order Management Page, or from the Creditmemo create page
Ans: C
Inside a .phtml file, what does “$this” refer to?
A. A class inheriting from Mage_Core_Helper_Abstract
B. A class inheriting from Mage_Core_Block_Abstract
C. $this is not defined in a .phtml file
D. A class inheriting from Mage_Core_Model_Abstract
E. The absolute path of the .phtml file
Ans: B
What Magento function can we employ to give special product pricing to specific customer groups based on qty purchased?
A. Coupon Discounts
B. Loyalty rewards
C. Special Sales Pricing
D. Tier Pricing
Ans: D
Which of the following does NOT return an instance of a helper object
A. Mage::helper(‘customer’);
B. Mage::app()->getLayout()->helper(‘customer’);
C. Mage::app()->helper(‘customer’);
D. Mage::app()->getLayout()->createBlock(‘core/template’) ->helper(‘customer’);
Ans: D
How do you completely disable a module in Magento?
A. Go to System > Configuration > Advanced and change the state to “Disable”
B. Edit the module’s configuration [module]/etc/config.xml
C. Edit the configuration file located in app/etc/modules
Ans: C
Which of the following will correctly translate the value of the label node?
A. <parent> <label translate=”true”>Value</label> </parent>
B. <parent translate=”label”> <label>Value</label> </parent>
C. <parent> <translate> <label>Value</label> </translate> </parent>
D. <parent> <labelxtranslate>Value</translatex/label> </parent>
Ans: A
What happens when you edit an existing order using the order management page?
A. The current order is canceled and a new order is created from scratch based on the current order’s data
B. Depending on the order status, different editing forms appear for the current order
C. A form appears that allows you to edit all information on the current order
D. A form appears that allows you to edit shipping information of the current order
Ans: A
What are the steps to sending a newsletter?
A. Add CMS Static Block, Embed block into CMS Page, Send Newsletter
B. Create a template, Queue for Sending
C. Create Newsletter, Enter Recipients, Click Send
D. Add New CMS Page, Send the Newsletter
Ans: B
How do you get the website’s URL?
A. Mage::getStoreConfig(‘unsecure/web/base_url’);
B. Mage::getStoreConfig(‘secure/web/base_url’);
C. Mage::getStoreConfig(‘web/unsecure/url’);
D. Mage::getStoreConfig(‘web/unsecure/base_url’);
E. Mage::getStoreConfig(‘web/secure/url’);
Ans: D
Which of the these block methods is the best one to override when you need to customize how the block’s HTML is rendered?
A. _toHtml()
B. setLayout()
C. renderLayout()
D. toHtml()
Ans: A
What is a Frontend Block?
A. Blocks that produce the actual content inside each structural block.
B. The tool with which you can assign content blocks to each structural block you create.
C. Blocks created for the sole purpose of assigning visual structure to a store page such as header, left column, main column and footer.
D. An element which creates the visual output either by assigning visual structure or by producing the actual content.
Ans: D
Which of the following is called to apply taxes on the product view page?
A. Mage_Tax__Helper_Data
B. Mage_Catalog_Model_Product_Type_Price
C. Mage_Tax_Model_Sales_Total_Quote_Tax
D. Mage_Sales_Model_Quote_Address_Total_Tax
Ans: B
When creating your own custom payment method, which module does it generally depend on and should be configured for correct module loading order?
A. Mage_Payment
B. Mage_Billing
C. Mage_Payment_Method
D. Mage_Method_payment
Ans: A
In which database table could you find the order state?
A. sales_flat_order
B. sales_flat_order_status
C. sales_flat_order_status_history
D. sales_flat_order_state
Ans: A
Which one of the following xpaths can be read using Mage::getStoreConfig(‘some/value’)?
A. some/value/default
B. stores/some/value
C. global/default/some/value
D. default/some/value
E. some/value
Ans: B
Which class is extended to render a drop-down in admin forms?
A. Mage_Adminhtml_Block_Abstract
B. Mage_Adminhtml_Block_Template
C. Mage_Adminhtml_Block_Widget
D. Mage_Core_Block_Abstract
E. Varien_Data_Form_Abstract
Ans: E
Is it mandatory to give Namespace while creating custom module in Magento?
A. Yes
B. No
Ans: B

Posted in Magento MCQs | Tagged , , , , , , , , , , , , , , | Leave a comment

50 TOP Real Time Magento Interview Questions and Answers pdf download

Read the most frequently asked 50 top Magento Interview Questions and Answers for freshers and experienced pdf

Magento Interview Questions and Answers List

Magento Interview Questions

Magento Interview Questions

1. What is Magento?
Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and
control over the look, content and functionality of their eCommerce store. Magentos intuitive administration interface features powerful marketing,
search engine optimization and catalog-management tools to give merchants the power to create sites that are tailored to their unique business needs.
Designed to be completely scalable and backed by Variens support network, Magento offers companies the ultimate eCommerce solution.

2. What is the difference between Mage::getSingletone() andMage::getModel() in Magento
Mage::getSingletone() always finds for an existing object if not then create that a newobject but Mage::getModel() always creates a new object.

3. Why Magento use EAV database model ?
In EAV database model, data are stored in different smaller tables rather than storing in asingle table.product name is stored in
catalog_product_entity_varchar tableproduct id is stored in catalog_product_entity_int tableproduct price is stored in catalog_product_entity_decimal
tableMagento Use EAV database model for easy upgrade and development as this model givesmore flexibility to play with data and attributes.

4. How to upgrade to the latest version using Magento Connect?
Upgrading Magento to the latest version is a fairly simple task. Copy and Paste this key magento-core/Mage_All_Latest VIA Magento Connect where it
states Paste extension key to install:. This will upgrade Magento to the newest version.

5. Explain about the Modules of Magento?
Magento supports installation of modules through a web-based interface accessible through the administration area of a Magento installation. Modules
are hosted on the Magento eCommerce website as a PEAR server. Any community member can upload a module through the website and is made available once
confirmed by a member of the Magento team. Modules are installed by entering a module key, available on the module page, into the web based
There are three categories of modules hosted on Magento Connect:
Core Modules
Community Modules
Commercial Modules
Core and Community modules can be installed via the administration area. Commercial module pages provide price information and a link to an external

6. What technology used by Magento?
Magento uses PHP as a web server scripting language and the MySQL Database. The data model is based on the Entity-attribute-value model that stores
data objects in tree structures, thus allowing a change to a data structure without changing the database definition.

7. What is MVC structure in Magento?
The Model-View-Controller (MVC) architecture traces its origins back to the Smalltalk Programming language and Xerox Parc. Since then, there have
been many systems that describe their architecture as MVC. Each system is slightly different, but all have the goal of separating data access,
business logic, and user-interface code from one another.

8. What is benefit of namespace (package) in magento?
We can have more than one module with same name but they should be placed in different namespaces. All magento core modules are contained in mage
and all custom modules are placed in

9. How to include CMS block in template file(.phtml)?
Access block’s content from .phtml template file by :
echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();

10. How to add an external javascript/css file to Magento?
skin_jsjs/ yourfile.js
skin_csscss/yourstyle. css

11. What are handles in magento (layout)?
Handles are basically used for controlling the structure of the page like which block will be displayed and where. First level child elements of the
node are called layout handles. Every page request can have several unique Handles. The handle is called for every page. handle for products belongs
to virtual product type, PRODUCT_TYPE_simple is called for product details page of simple product type and PRODUCT_TYPE_virtual is called for the
virtual product detail page and customer_logged_in handle is called only if customer is logged in. The muster_index_index handle is created by
combining the frontName (muster), Action Controller (index), and Action Controller Action Method (index) into a single string and this handle will be
called only when /zag/index/index url is accessed.

12. What is in magento?
The routers tag allow us to decide frontname for each module. The tag is defined in config.xml file of module. For Namespace_MyModule frontname is
moduleurl so the url will be like :

13. Which factors affect performance of magento?
1. EAV structure of magento database, even for retrieving single entity the query becomes very complex .
2. Magento’s template system involves a lot of recursive rendering
3. Huge XML trees built up for layout configuration, application configuration settings

14. How to improve magento performance?
Enabled magento caching
MySQL Query caching
Enable Gzip Compression
Disable any unused modules
Disable the Magento log
Optimise your images
Combine external CSS/JS into one file
Enable Apache KeepAlives: Make sure your Apache configuration has KeepAlives enabled.

15. How to get the Total Price of items currently in the Cart?
helper(‘checkout’)->formatPrice(Mage::getSingleton(‘checkout/cart’)->getQuote()->getGrandTotal()); ?>

16. How to set different themes for logged in users?

17. How to create magento custom module?
Steps to create custom magento module:
Namespace : Zag
Module Name : Mymodule
1. Create directory Mymodule in app/code/local/Zag
2. Create Block, controllers, etc, Module directories. Create controller, block and module file as required.
3. Create module configuration file (app/code/local/Zag/Mymodule/etc/config.xml).
4. Create xml file (app/etc/modules/Zag_ Mymodule.xml)to enable/disable module and tell magento system from which code pool that module will be

18. How to set different themes for each store?
Go to : System>Designs
Then, add new design change or edit existing. You can select Store and Custom Design.

19. How to make product’s custom attribute searchable in adavance search?
Go to : Catalog > Attribues > Manage Attribues
Edit the attribute and select “Yes” for Use in Advanced Search.

20. How to fetch 5 bestsellers products programmatically?
->setPage(1, 5)

21-Explain Magento’s MVC architecture
First of all, what is MVC?
MVC stands for Model-View-Controller. Any application that separates it’s data access, business logicand user interface is called MVC. There can be
two types of MVC: convention-based andconfiguration-based. Example, cakePHP is convention-based, i.e. you just need to follow the instructions of the
core system to get your module ready in just few lines. Magento is configuration-based, i.e. you need to specify each and every thing to your
module’s config file in order to get it work. Magento has Controller (for Routing), Block (for Business Logic), Model (for DB access, sql) and
Template file (for Presentation i.e. View).
How Magento’s MVC works:
1. When you enter the URL (something like http://mysite.com/frontname/controller/method/param1/value1/param2/value2), this URL is intercepted by one
PHP file called index.php which instantiates Magento application
2. Magento application instantiates Front Controller object
3. Further, front controller instantiates Router objects (specified in module’s config.xml, global tag)
4. Now, Router is responsible to “match” the frontname which is in our URL
5. If “match” is found, it sees controller name and method name in the URL, which is finally called.
6. Now depending on what is written in action name (method name), it is executed. If any models are called in it, the controller method will
instantiate that model and call the method in it which is requested.
7. Then the controller action (method) instantiate the Layout object, which calls Block specified for this action (method) name (Each controller
action name have block and template file associated with it, which can be found at app/design/frontend or
adminhtml/namespace/module/layout/module.xml file, name of layout file (module.xml) can be found in config.xml of that module, in layout updates
8. Template file (.phtml) now calls the corresponding block for any method request. So, if you write $this->methodName in .phtml file, it will check
“methodName” in the block file which is associated in module.xml file.
9. Block contains PHP logic. It references Models for any data from DB.
10. If either Block, Template file or Controller need to get/set some data from/to database, they can call Model directly like Mage::getModel
For diagramatic view: click here (courtsey: Alan Storm)

22 =How Magento ORM works?
ORM stands for Object Relational Mapping. It’s a programming technique used to convert different types of data to Objects and vice versa.
In Magento, ORM is shown as Model (based on Zend Framework’s Zend_Db_Adapter), which further breaks down to two types of Models.
– First is the “simple” i.e. Regular Models which is nothing but flat table or our regular table structure.
– Second Model is EAV (Entity Attribute Value), which is quite complicated and expensive to query.
All Magento Models interacting with database are inherited from Mage_Core_Model_Abstract class, which is further inherited from Varien_Object.
Difference between two Models is, Simple Model is inherited from Mage_Core_Model_Resource_Db_Abstract class,
while EAV is inherited from Mage_Eav_Model_Entity_Abstract.
For those who don’t know what EAV is, please read my 3rd answer below.
So, to end up this question,
when you want to get some data in Magento, you call it like this:
where 1 is the primary key id for some Regular/Simple table, while in EAV so many tables are joined to fetch just single row of data.

23. What is EAV in Magento?
EAV, stands for Entity Attribute Value, is a technique which allows you to add unlimited columns to your table virtually. Means, the fields which is
represented in “column” way in a regular table, is represented in a “row” (records) way in EAV. In EAV, you have one table which holds all the
“attribute” (table field names) data, and other tables which hold the “entity” (id or primary id) and value (value for that id) against each
In Magento, there is one table to hold attribute values called eav_attribute and 5-6 tables which holds entity and data in fully normalized form,
– eav_entity, eav_entity_int (for holding Integer values),
– eav_entity_varchar (for holding Varchar values),
– eav_entity_datetime (for holding Datetime values),
– eav_entity_decimal (for holding Decimal/float values),
– eav_entity_text (for holding text (mysql Text type) values).
EAV is expensive and should only be used when you are not sure about number of fields in a table which can vary in future. To just get one single
record, Magento joins 4-5 tables to get data in EAV. But this doesn’t mean that EAV only has drawbacks. The main advantage of EAV is when you may
want to add table field in future, when there are thousands or millions of records already present in your table. In regular table, if you add table
field with these amount of data, it will screw up your table, as for each empty row also some bytes will be allocated as per data type you select.
While in EAV, adding the table column will not affect the previously saved records (also the extra space will not get allocated!) and all the new
records will seamlessly have data in these columns without any problem.

24. Difference between Mage::getSingleton() and Mage::getModel()
The difference between Mage:getSingleton() and Mage::getModel() is that the former one does not create an object if the object for same class is
already created, while the later creates new objects every time for the class when it’s called.
Mage::getSingleton() uses the “singleton design pattern” of PHP. If the object is not created, it will create it.
Mage::getSingleton() is mostly used when you want to create an object once, modify it and later fetch from it. Popular example is session, you first
create a session object, and then add/remove values from session across different pages, so that it retains your values (e.g. cart values, logged in
customer details, etc.) and doesn’t create new session object losing your last changes.
Mage::getModel() is used when you want to have the fresh data from the database. Example is when you want to show records from database.

25. What are the addAttributeToFilter Conditionals in Magento?
In Magento we can use addAttributeToFilter Conditions same as WHERE in SQL

Below are the all condtions:-
Equals: eq
$_products->addAttributeToFilter(‘status’, array(‘eq’ => 1));

Not Equals – neq
$_products->addAttributeToFilter(‘sku’, array(‘neq’ => ‘test-product’));

Like – like
$_products->addAttributeToFilter(‘sku’, array(‘like’ => ‘UX%’));

One thing to note about like is that you can include SQL wildcard characters such as the percent sign.

Not Like – nlike
$_products->addAttributeToFilter(‘sku’, array(‘nlike’ => ‘err-prod%’));

In – in
$_products->addAttributeToFilter(‘id’, array(‘in’ => array(1,4,98)));

When using in, the value parameter accepts an array of values.

Not In – nin
$_products->addAttributeToFilter(‘id’, array(‘nin’ => array(1,4,98)));

NULL – null
$_products->addAttributeToFilter(‘description’, ‘null’);

Not NULL – notnull
$_products->addAttributeToFilter(‘description’, ‘notnull’);

Greater Than – gt
$_products->addAttributeToFilter(‘id’, array(‘gt’ => 5));

Less Than – lt
$_products->addAttributeToFilter(‘id’, array(‘lt’ => 5));

Greater Than or Equals To- gteq
$_products->addAttributeToFilter(‘id’, array(‘gteq’ => 5));

Less Than or Equals To – lteq
$_products->addAttributeToFilter(‘id’, array(‘lteq’ => 5));

26. How to change Currency in INR in magento? Ans. In Magento, Currency change is very easy just we need to follow below step:
1. From the Admin panel, select System > Configuration. 2. From the Configuration panel on the left, under General, select the Currency Setup tab.
Click to expand the Currency Options section. Then, do the following: 1. In the Base Currency list, select the primary currency that is used for
store transactions.
2. In the Default Display Currency list, select the primary currency that is used to display pricing in your store.
3. In the Allowed Currencies list, select all currencies that are accepted as payment by your store. When finished, click the Save Config button. To
customize currency symbols: Currency symbols appear in the Admin panel of your store, and are also used throughout your storefront in orders,
customer checkout, and so on.
1. From the Admin panel, select System > Manage Currency > Symbols.
2. Each enabled currency for your store appears in the Currency list. 3. Enter a custom symbol to use for each currency, or select the standard
symbol selecting the Use Standard checkbox to the right of each currency. When finished, click the Save Currency Symbols button.

27. Difference between Final Class and Abstract Class.
Final Class: A Class which Can’t be inherited by other class, that class is called final class. You all knows that final class is inbuilt in java.
But in C++ you have to create final class.Two types of Final class, you can create . One who want to create object of final class on Heap and other
who wants to create object of Final class on stack.
1.It makes use of private constructor, virtual inheritance and friend class.
2.In place of priavte constructor, use private Destructor. Because Constructor can be overloaded and Destructor can’nt be overloaded.

28. what is EAV in Magento?
=> Entity Attribute Value this allows us to add unlimited columns or attributes
=> In EAV, we have one table which holds all the “attribute”
=> “column” way in a regular table, “row” (records) way in EAV. In EAV
– eav_entity_varchar
– eav_entity_datetime
– eav_entity_decimal
– eav_entity_text
=> EAV, adding the table column will not affect the previously saved records.

29. How Magento’s MVC architecture works:
– Model, View and Controller
– MVC it two type convention-based and configuration-based
– Magento has Controller (for Routing),

Block (for Business Logic),
Model (for DB access, sql) and
Template file (for Presentation i.e. View).

30. How Magento ORM works?
– Object Relational Mapping. It’s a programming technique used to convert different types of data to Objects and vice versa.
– ORM is shown as Model, two types of Models, 1-simple(regular table structure) 2-eav(4-5 tables)
– Difference between two Models is, Simple Model is inherited from Mage_Core_Model_Resource_Db_Abstract class,
while EAV is inherited from Mage_Eav_Model_Entity_Abstract.
– Magento, you call it like this: Mage::getModel(‘module/model’)->load(1);

31. How to run custom MySql query in Magento ?
– $db = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’);
– $result=$db->query(“SELECT * FROM PCDSTable”);

32. Is it mandatory to give Namespace while creating custom module in Magento?

33. How will you add/remove content from core’s system.xml file?
<label>Overriding Catalog Frontend in system config</label>

<!–changing cashondelivery payment method settings–>

33. Can you have more than one Grid in a module?

34. How will you enable maintenance mode of your Magento website?
If you want your Magento website to show in maintenance mode, you will have to do two things.
1. Create a file name maintenance.flag in your magento root directory. Contents under this file doesn’t matter, you can keep it empty.
2. Change the maintenance file (located in magento root -> errors -> default directory) to show proper message when user visits your website.

35. How many database tables will Magento create when you make a new EAV module?
Magento creates 6 tables when you create new EAV module. Tables: module, module_datetime, module_decimal, module_int, module_text and module_varchar.
one is the main entity table, and rest 5 tables which holds attribute’s data in different data types. So that integer values will go to module_int
table, price values to module_decimal, etc.

36. Where is the relation between configurable product and it’s simple product stored in database?
In the 2 tables:

Posted in Magento Interview Questions and Answers | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

99 TOP Real Time Linux Multiple choice Questions and Answers pdf download

Read the most frequently asked 99 top Linux multiple choice questions and answers PDF for freshers and experienced

Linux Objective type Questions and Answers List


What is the linux mascot?
A. Hat
B. Gecko
C. Elephant
D. Penguin
Ans: D

How do you show all processes being run by a particular user?
A. cat /home/USERNAME/open.process
C. cat /etc/activeprocess | grep USERNAME
D. netstat -u USERNAME
E. top -U [USERNAME]
Ans: E

What does GRUB stand for?
A. Grand Unified Bootloader
B. Grand Unification Bootloader
C. Great Unique Bootloader
D. Gum Removal Under Boot
E. Great Ultimate Bootloader
Ans: A

GRUB stands for _____.
A. Grand Unified Boot Loader
B. Gentoo’s Regular Booter
C. Great Unix Boot Loader
D. GNU Released Unix Booter
Ans: A

mount -a’ will load all filesystems listed in:
A. /etc/mtab
B. /etc/filesystems
C. /etc/fstab
D. /etc/fs.conf
Ans: C

What is GNOME ?
A. A computer software system and network protocol that provides a basis for graphical user interfaces (GUIs) and rich input device capability for networked computers.
B. A desktop environment and graphical user interface that runs on top of a computer operating system.
C. A linux distribution
Ans: B

.ads in wordpress

Ubuntu is based on…
A. Fedora
B. Slackware
C. Debian
D. None of these
E. Gentoo
Ans: C

How do you activate the noclobber shell option?
A. noclobber
B. set -o noclobber
Ans: B

The Linux Kernel was written by?
A. Brian Kernighan
B. Dennis Ritchie
C. Richard Stallman
D. Linus Torvalds
Ans: D

What will show you all the subdirectories of the current directory?
A. rm
B. ls
C. cd
D. cp
Ans: B

Which directory contains all the files needed to boot the Linux system?
A. /dev
B. /boot
C. /bin
Ans: B

‘mkfs’ is used to:
A. create a filesystem on a device (such as a hard disk partition)
B. format a floppy disk
C. create a fast changing section on a hard disk
D. create a named pipe (fifo) on a device
Ans: A

The ”rm” command is used to:
A. remove a kernel module owned by you
B. run an M4 macro
C. mount a remote file system
D. delete a file
Ans: D

What makes up a Linux kernel?
A. base kernel
B. kernel modules
C. all of these
Ans: C

What is the ssh command?
A. It is the standard shell: it has a restricted set of commands, but those are portable across different Linux distributions.
B. It is the synchronous shell: all commands are performed in real-time.
C. It is the secure shell; it is used to restrict actions available to users.
D. It is the secure shell; it is used to connect to remote hosts via an authenticated and encrypted channel.
E. It is the synchronous shell: all commands are performed in a synchrous way.
Ans: D

What does the pwd command do?
A. It saves the current working directory, so that you can return there with the popd command.
B. It asks the password of the current user, and the prompts for a new password.
C. It prints the path of the current working directory
D. It launches the power management daemon.
Ans: C

SSH stands for _____.
A. Security Shell
B. Synchronous Shell
C. System Shell
D. Secure Shell
E. Super Shell
Ans: D

mknod can create special file (used for sending or receiving data) of type:
A. character file
B. fifo (pipe) file
C. all are correct
D. block file
Ans: C

If you wanted to execute a shell command in the background, which character would you put at the end of the command line?
A. &
B. ;
C. :
Ans: A

The loaded modules in the kernel are listed in /proc/modules. You can get this list using the command:
A. lsmod
B. lsattr
C. listmodules
D. modules
Ans: A

Executing “pwd” in shell will return:
A. None of these
B. There is no such command
C. Your password
D. Current directory
Ans: D

_____ is a Linux “desktop environment”.
B. Gnome
D. All of these
Ans: D

What does it means when the ps commands shows a ‘Z’ in the status column for a process?
A. The process is in sleep mode.
B. The process is running at top priority.
C. The process is a zombie process.
D. The process is running at low priority.
Ans: C

The netstat command give information on:
A. all are correct
B. active sockets
C. open sockets
D. routing tables
Ans: A

To repeat the last command in the bash shell history, type…
A. !!
C. !6
Ans: A

How do you view the documentation for the command ‘kill’ in the Linux terminal?
A. kill -help
B. kill –help
C. doc kill
D. cat /etc/docs/kill | less
E. man kill
Ans: E

What is swap?
A. Swap space is the area on a hard disk which is part of the Virtual Memory of your machine (Swap+RAM)
B. Swap is the cache of your HDD
C. Swap is the cache of your Physical Memory (RAM)
D. Swap is the ability to switch between users in one terminal session
Ans: A

Which answer assists you in finding help on the whois command?
A. help whois
B. man whois
C. none of these
D. man help whois
Ans: B

To start another shell under the current shell you use the command:
A. bash
B. All of these
C. sh
D. csh
Ans: B

To query DNS (Internet domain name) servers, you use the command:
A. dns
B. lsrouted
C. dnsquery
D. nslookup
Ans: D

Add this symbol to a command to run it in the background
A. &
B. *
C. 2
D. $
E. ?
Ans: A

What is the right command to save file and exit in Vim?
A. :wq
B. :a
C. :q
D. :q!
E. :w ‘file name’
Ans: A

Fedora Linux uses _____ packages.
A. deb
B. ebuild
C. deb_src
D. rpm
Ans: D

With which userspace is Linux typically paired?
A. Hurd
B. System V
E. Minix
Ans: C

As a privileged user, you may set the hostname with the command:
A. hostname
B. name
C. hn
D. host
Ans: A

What command can be used to delete a directory, recursively searching for files and other directories and deleting them?
A. rd
B. rmdir
C. rm -d
D. deltree
E. rm -r
Ans: E

On Red Hat Linux and its derivatives, which of the following commands will be appropriate to check whether a particular “package” is installed or not?
A. query-pkg
B. rpm -qa
C. pkg
D. sys
E. ls
Ans: B

To transfer files in an insecure way to and from a remote network site host, you use the command:
A. ftp
B. tcp
C. ucp
D. sftp
Ans: A

Which firewall is most commonly used on Linux?
A. ipchains
B. ipfw
C. pf
D. iptables
Ans: D

/etc/resolv.conf is …
A. Configuration file with local user accounts and its identificators
B. Network interfaces configuration file
C. The DNS resolver configuration file
D. Configuration file with software sources
E. This file does not exist
Ans: C

A. is a boot loader that can boot Linux
B. stands for “Lannister-In-Lannister-Out”
C. is only used by Slackware
D. stands for “Light Loader”
E. is a type of Linux Distro
Ans: A

LVM is…
A. Logical Volume Manager
B. Linux Video Manager
C. Linux Volume Manager
D. Light Video Manager
Ans: A

uname -a will output…
A. kernel info
B. architecture
C. date where the kernel was built
D. cpu info
E. All of the answers are correct.
Ans: E

Consider using the command “cd /a/b/c”, then executing “cd ..”. What does this last command do?
A. changes to your home directory
B. displays the default directory path
C. prompts you for the next directory choice
D. changes to the / directory
E. changes to /a/b directory
Ans: E

Which tool is similar to find except that it uses an index to search?
A. locate
B. fastfind
C. search
Ans: A

To read one or more files and type them on standard output, you use:
A. ls
B. cat
C. type
D. biff
Ans: B

the ‘-r’ switch to the mount command will:
A. mount remote (network) filesystems
B. mount filesystem only after a read-write check is performed
C. mount removable (e.g., CD-ROM) filesystem
D. mount a filesystem as read-only
Ans: D

Which return value from an ioctl request indicates success?
B. 0
Ans: B

The command “free” reports on:
A. memory
B. cpu
C. disk space
Ans: A

The jobs command
A. puts all foreground jobs in the background
B. lists background jobs
C. prints a dedication to Steve Jobs
D. provides basic accounting information for all current jobs
E. halts all foreground jobs
Ans: B

What does the Linux “no” command do?
A. Nothing; it doesn’t exist.
B. It’s the opposite of the “yes” command; it outputs an infinite series of ‘n’s (or a word of your choice).
C. It returns a non-zero exit code to indicate failure (it’s a synonym to the “false” command).
Ans: A

The command du -h ~
A. duplicates the current process
B. searches you home directory for duplicate filenames
C. deletes your account and home directory
D. lists the size of all files within your $HOME with sizes in human readable form
E. dumps your home directory to /tmp
Ans: D

Why hasn’t ZFS been added to the Linux kernel?
A. It’s too hard to port filesystems to Linux
B. Oracle is suing the Linux Foundation
C. Sun’s implementation uses a license incompatible with the GPL
D. There is a user space port using FUSE
Ans: C

What does “chmod 755 file” accomplish?
A. Makes the file read/write/execute by the owner, read/execute by group and other.
B. Makes the file execute by the owner, execute/read by group and other.
C. Makes the file write/execute by the owner, execute by group and other.
D. Makes the file read by the owner, execute by group and other.
E. Makes the file write/read by the owner, execute by group and other.
Ans: A

LILO is _____.
A. used for LIsting the boot LOaders
B. a boot loader
C. lists all the devices
D. lists all the lower memory areas
E. a type of Linux
Ans: B

What is a zombie process?
A. A zombie process is a process created by a worm to remain active even after it is killed.
B. A zombie process is a process which has terminated, but whose parent had not yet read its exit status.
C. A zombie process is a process whose status had been saved on the disk, and which is now waiting to be restored.
Ans: B

Which is an example of a shell comment?
A. mkdir text # make a directory
B. mkdir text //make a directory
C. //mkdir text
Ans: A

If a host is called HHH, ‘rstat HHH’ will:
A. show HHH uptime
B. show HHH load averages
C. all are correct
D. show HHH current time
Ans: C

Which of the following is not an editor?
A. expr
B. vi
C. emacs
D. ex
Ans: A

To use chown recursively, instead of using _recursive you can use:
B. -r
C. -c
D. -R
Ans: D

How would you create an alias for the cat command?
A. alias bkw=cat
B. You cannot do that.
C. ren bkw=cat
Ans: A

To access the value of an environment variable, we _____.
A. add the dollar ($) symbol before the variable name
B. type the variable’s name (in lower case only)
C. add the hash (#) symbol after the variable name
D. add the dollar ($) symbol after the variable name
E. add the underscore (_) symbol before the variable name
Ans: A

How to reveal detailed information about CPU?
A. sysinfo –cpu
B. cpusage
C. dmesg
D. cat /proc/cpuinfo
Ans: D

_____ command starts the default desktop environment.
A. gdm
B. xterm
C. startx
D. gdm-start
E. gnome-terminal
Ans: C

You want to load the main kernel module for USB support. Which command would help you achieve this task?
A. modprobe usbcore
B. modprobe ehci-ocd
C. modprobe uhci-hcd
Ans: A

If DDD is a non empty directory, and you execute ‘rmdir DDD’, it will:
A. move the contents of DDD to /tmp, and delete the DDD directory
B. delete only the contents of the DDD directory
C. produce an error
D. delete both the contents of and the DDD directory
Ans: C

lsof command means:
A. Large Scale Optimization File
B. List Open Files
C. Local System Officer
D. Local Service of Files
E. Lag Spike of Death
Ans: B

Which of the following accurately describes a “ping?”
A. sends ICMP packets to target device/server to verify if it’s online.
B. makes an audiable ping each time a disk drive start spinning
C. verifies that the routing tables comply to the current network state
D. sends TCP packets to target device/server to verify if it’s online.
Ans: A

What is the maximum length of a file name on Linux?
A. 255 bytes.
B. 1023 bytes.
C. It depends on the file system.
D. 1024 bytes.
E. 256 bytes.
Ans: C

The run level in a system can be configured in the file _____.
A. /bin/runlev
B. /sys/rinit
C. /bin/rlev
D. /etc/inittab
E. /etc/syslev
Ans: D

When does /tmp normally get cleaned out?
A. Never; it has to be manually cleaned.
B. Every time the system is booted.
C. Every week (run by /etc/cron.weekly).
D. Every month (run by /etc/cron.monthly).
Ans: B

To report the amount of free disk space available on all mounted file systems you use the command:
A. free
B. fs
C. du
D. df
Ans: D

In a date +format, you add the hour in 24 hours format using:
A. %f
B. %H
C. %F
D. %h
Ans: B

What does the “uname” command do?
A. nothing
B. print system information
C. show the user name
D. change user name
Ans: B

If you use the rm command to accidentally delete a file, how can you get the file back?
A. You cannot get the file back.
B. Go to the trash bin and remove it.
C. Type the rm -u command.
Ans: A

The behavior of the system for each “runlevel” is available in the _____ file.
A. /etc/mtab
B. /etc/inittab
C. /etc/hosts
D. /etc/rlevel
E. /etc/crontab
Ans: B

command1 | command2 will?
A. Command1 and Command2 run together
B. Output command2 wil be input of command1
C. Output command1 wil be input of command2
D. Command2 run after Command1
Ans: C

printenv will:
A. print a text file to the printer specified in /etc/env
B. print a text file to the printer specified in $PRINTER
C. type values of environment variables
D. print a text file to the default printer
Ans: C

Is it possible to increase SWAP space without rebooting?
A. No, you have to boot with a Live CD to do that
B. No, you have to reboot for the new swap to be activated properly
C. No, you have to re-install your system to do that
D. Yes if you create a swap file
Ans: D

To print the first 10 lines of one or more files to the standard output, you use the command:
A. topf
B. head
C. ftop
D. start
Ans: B

What flag makes “ls -l” print file sizes in human readable format (e.g. 1K, 231M, 2G, etc)?
A. -f
B. -r
C. -H
D. -h
Ans: D

True or false: The Linux OS is not affected by malware.
A. True
B. False
Ans: B

Which Run Level provides “Full multiuser mode with network and X display manager”?
A. Run Level 4
B. Run Level 5
C. Run Level 1
D. Run Level 3
E. Run Level 2
Ans: B

To create one or more directories with the mkdir command, which permissions in the directory’s parent directory do you need?
A. create
B. write
C. execute
D. read
Ans: B

To display contents of files on standard output, you could use the command:
A. All of these
B. cat
C. more
D. less
Ans: A

The at command allows you to execute a command at:
A. a certain machine
B. a certain holiday
C. a certain date
D. a certain network
Ans: C

In a ps command output, the PPID displays the:
A. Number of memory pages (swap) of the process
B. Process’s scheduling priority
C. Process ID
D. Parent process ID
Ans: D

‘mv -f’ will:
A. even if the target file exists, the operation will be carried out (and no warning messages on restricted access modes will be printed)
B. move the file to the filesystem indicated after the ‘-f’ switch
C. will move the file in a fast mode, namely will not make any checks (like if there’s enough space for the file)
D. will move the file or directory to a FIFO device
Ans: A

_____ is not a ‘Terminal Emulator’.
A. konsole
B. xterm
C. gnome-terminal
D. gdm
Ans: D

How do you redirect stderr to stdout?
A. Using >>stderr
B. Using 2>&1
C. Using >/dev/error
Ans: B

What, according to bc, is 2^2?
A. 4.00000001
B. 4
C. 2
D. A syntax error.
Ans: B

Typing the “cd” command at the shell prompt will take you to the _____.
A. /root
B. parent
C. current
E. /boot
Ans: D

modinfo [options] ofile’ will:
A. create a help file for kernel module ofile
B. print information about kernel module ofile
C. set information about kernel module ofile
D. set default handling options for kernel module ofile
Ans: B

A. types the header section of the specified module
B. searches all filesystems for the specified module
C. searches memory to see if the specified module is loaded to memory
D. attempts to load a kernel module along with all its depended modules
Ans: D

Which of the following file ‘probably’ contains the ‘user specific’ settings for the “windows manager”?
A. /X11/xinit/xinitrc
B. $HOME/.xinitrc
C. /xinit/xinitrc
D. /.xinitrc
E. /etc/X11/xinit/xinitrc
Ans: B

To search one or more files for matching lines, which command may be used?
A. grep
B. egrep
C. fgrep
D. All of these
Ans: D

What does the $ represent within the context of a shell command?
A. The string after the $ is replaced by a directory name.
B. all of these
C. The string after the $ will take on the value of the environment variable with the same name.
Ans: C

Write a command to list all files with 5 characters in the name.
A. ls !!!!!
B. ls ?????
C. ls *****
Ans: B

The mkraid command will:
A. separate the disk devices into two groups and will create RAID 1/0 on them
B. initialize a new RAID array, destroying any existing data on the disks used
C. move any data on the disk devices used to create the array into the new RAID
D. create a new RAID 5 on the disk devices
Ans: B

Single User Mode equivalent to _____.
A. run level 4
B. run level 1
C. run level 3
D. run level 2
E. run level 0
Ans: B

What binary format do Linux Executables use?
C. Mach-O
D. a.out
Ans: B

To see the kernel routing tables, you do:
A. route or netstat -r
B. routing
C. route -w
D. cat /etc/routetab
Ans: A

What is “vmlinuz”?
A. It is a “virtual machine” used in Linux.
B. It is a “type of Linux Shell”.
C. This command executes Linux in “virtual mode”.
D. It is a “compressed Linux kernel”.
E. It is a “type of Linux operating system”.
Ans: D

What is the uid of root?
A. -1
B. 0
C. superuser
D. 1000
E. 1
Ans: B

pwconv will…
A. convert /etc/passwd file so non previleged users could edit it
B. revert the system to use unshadowed passwords
C. convert entries in /etc/passwd (un-shadowed) into shadowed entries in /etc/shadow
D. convert /etc/passwd entries from Unix to Linux format
Ans: C

SSH uses _____ to authenticate remote computers.
A. public key cryptography
B. secret key cryptography
C. both block and stream ciphers
D. stream cipher
E. block cipher
Ans: A

By default what file contains encrypted user passwords?
A. /etc/password
B. /etc/master.passwd
C. /etc/passwd
D. /etc/shadow
E. /etc/passwdinfo
Ans: D

‘mkdir -m 444 any’ will:
A. Create a read-write-execute directory named any
B. create a read-only directory named any
C. Create a write-only directory named any
D. Create a read-write directory named any
Ans: B

What program is launched by the kernel at system start up first?
A. /sbin/start
B. /boot
C. /sbin/initial
D. /sbin/init
E. /etc/rc.d/rc.sysinit
Ans: D

How do you make a list of all filenames in the /tmp directory that the contain the text “user”, regardless of case?
A. ls /tmp : grep user
B. ls /tmp | grep user
C. ls /tmp | grep -i user
D. grep user /tmp
E. ls /tmp | find user
Ans: C

rev will:
A. reverse the order of characters read from standard input and type the result stream of characters to standard output
B. reverse the spin of a local disk drive
C. review the networking status and alert on problems
D. type the system revision number to standard output
Ans: A

Can I have swap partition and swap file activated at the same time?
A. Yes
B. No
C. Only if you set ‘vm.swappiness=100’
D. Only if you set priority of swap containers
Ans: A

To write a message to all users (on their terminals) over a network, you use:
A. rwrite
B. write
C. rwall
D. wall
Ans: D

What will you get if you try to read from the pseudo-device /dev/null?
A. An infinite string of zeroes (‘0’, ASCII 0x30).
B. An error (/dev/null can only be written to, not read from).
C. An infinite string of nulls (‘\0’, ASCII 0x00).
D. Nothing.
Ans: D

How to display current iptables rules?
A. ipfw
B. iptables -L
C. iptables -l
D. route -n
E. iptables –show
Ans: B

How do you find all files in /etc which end in .conf?
A. find /etc *.conf
B. find /etc -name “*.conf”
C. all of these
Ans: B

Executing the command “init 6” will _____.
A. set the run level to 0
B. kill the “init” process
C. change the user interface to CUI
D. reboot the system
E. halt the system
Ans: D

What does it mean when a variable is unbound?
A. It is not defined.
B. It exists but is not a displayable type.
Ans: A

For what purposes can socat be used?
A. Bridging a TCP and UDP service
B. Concatenating arbitrary pcap files to the network
C. SOCKS Proxy
D. IPv6 to IPv4 bridging
E. All of these
Ans: E

What source control system does the Linux kernel use?
A. patches
B. bitkeeper
C. git
D. svn
E. cvs
Ans: C

Information about modules, like module dependency, and where certain types of modules reside in the filesystem, is found in:
A. /etc/infomod.conf
B. /etc/lsmod.conf
C. /etc/modinfo.conf
D. /etc/modules.conf
Ans: D

The user smith issued the egrep “^[[:upper:]]” words.txt command. What does this command do?
A. displays all lines in the words.txt file after translating lowercase letters to uppercase
B. displays all lines in the words.txt file that begin with an uppercase letter
C. displays all lines in the words.txt file that contain an uppercase letter
D. displays all lines in the words.txt file after translating uppercase letters to lowercase
Ans: B

What is not part of the Linux Kernel?
A. Word Processor
B. The bash shell
C. C Compiler
D. All of these
Ans: D

To send a file to the printer spool queue, you use the command:
A. pr
B. spool
C. lpr
D. print
Ans: C

Which of the following commands can be used to change the run level?
A. runlevel -c
B. inittab
C. rlev -l
D. mod-runlevel
E. init
Ans: E

“Run Level Zero (0)” stands for _____.
A. Single User Mode
B. Multi User Mode
C. Halt
D. Reboot
E. Not Used/User Definable Mode
Ans: C

options (switches) to the ps command may start with:
A. –
B. —
C. all are correct
D. nothing
Ans: C

Which of the following files ‘probably’ contains the default “windows manager settings”?
A. $HOME/.xinitrc
B. /xinit/xinitrc
C. .xinitrc
D. /X11/xinit/xinitrc
E. /etc/X11/xinit/xinitrc
Ans: E

If the system is not in runlevel 0 or 6, before performing a power-off operation, the poweroff command will execute:
A. shutdown -S
B. shutdown -s
C. shutdown -r
D. shutdown -h
Ans: D

Reset will…
A. reboot a system
B. clear your session’s screen (terminal)
C. restart a program
D. disconnect all processes from a disk drive
Ans: B

To format a device as a Linux second extended filesystem (ext2), you use the command:
A. Both mke2fs and mkfs.ext2
B. mke2fs
C. mkfs.ext2
Ans: A

What will “cat /proc/mdstat” tell you?
A. The state of your RAID file system (if any).
B. The list of MSDOS file systems that you have mounted (if any).
C. The MD5 hash of the running kernel for security/integrity purposes.
D. The magnetic tape drive’s status (if any).
E. “cat: /proc/mdstat: No such file or directory” 😛
Ans: A

What does the following line mean when it is run in a script ‘#!/bin/bash’?
A. It makes sure that the script runs in the bash shell.
B. It checks to see if the bash shell exists on the machine.
C. all of these
Ans: A

Given that the ip command is installed, what is the effect of the command ip a ls
A. It lists the neighbours of the system on an IP network.
B. Command “ls” is unknown, try “ip addr help”.
C. It lists the defined interfaces and the addresses associated with those interfaces.
Ans: C

The backslash on the command line indicates
A. the root directory
B. a command pipe
C. a one-character escape
D. the end of a file
E. a regular expression search
Ans: C

What does permission 641 (octal) mean?
A. Owner can read and write; group can write; other can read
B. Owner can read and write; group can write and execute; other can read
C. Owner can read, write and execute; group can read and write; other can read
D. Owner can read and write; group can read; other can execute
E. Owner can read and execute; group can read and write; other can execute
Ans: D

The acronym WINE stands for:
A. Wine is not an Emulator
B. Windows Emulator
C. Windows Environment
D. Wine is Not for Eunichs
Ans: A

In a BASH script this command line parameter contains the scripts own name:
B. $$
C. $?
D. $0
E. $1
Ans: D

In bash you can use these quote marks for command substitution.
A. backquotes ` `
B. forward slashes / /
C. single quotes ‘ ‘
D. double quotes ” ”
E. backslashes \ \
Ans: A

What happens if you try to write to /dev/null and /dev/zero?
A. You cannot write to /dev/null, only to /dev/zero.
B. Nothing.
C. You cannot write to /dev/zero, only to /dev/null.
D. You cannot write to either of them, only read from them.
Ans: B

Which of the following is a way to update mlocate’s index?
A. updatedb
B. dbupdate
C. find -mlocate
D. mlocate -u
E. dbmlocate
Ans: A

In the command ‘mv source target’, if source is a directory and target is an existing directory, the result will be to:
A. overwrite ‘target’ directory with ‘source’ directory
B. move ‘source’ directory to be a subdirectory of ‘target’ directory
C. move ‘source’ directory to be on same level in the directory tree as ‘target’ directory
D. merge ‘target’ directory with ‘source’ directory
Ans: B

Running “man –locale=LLL” instructs man to override the value of which of these functions?
A. local(LLL)
B. whereami()
C. setlocale()
D. local()
Ans: C

Which of the following commands will correctly display the version of the Linux kernel running?
A. All three commands work
B. uname -r
C. uname -o
D. None of these commands work
E. sysinfo
Ans: B

mktemp -d’ will:
A. will create a dump filesystem
B. will create a swap filesystem
C. will create a temporary filesystem
D. create a unique temporary directory (e.g., for script’s commands usage)
Ans: D

newaliases will:
A. rebuild the mail aliases database that reside in /etc/aliases
B. types all the aliases the news reader uses
C. updates the news reader’s aliases from the file /etc/aliases
Ans: A

‘mv -u’ will:
A. not remove a file or link if its modification date is the same as or newer than that of its replacement
B. will create a backup of the target so an ‘undo’ is possible
C. undo the last mv command performed on the same filesystem
D. will translate DOS formatted files to Unix format (e.g., will change end-of-line characters)
Ans: A

How find the current system runlevel?
A. sys level show
B. init
C. init -q
D. runlevel -h
E. runlevel
Ans: E

To format a device as an ext3 (journaled) Linux extended filesystem, you use the commands:
A. mkfs.ext3
B. all are correct
C. mkfs.ext2 -j
Ans: B

To do unlimited precision arithmetic calculations from the shell, you use:
A. All of these
B. bc
C. cal
D. calc
Ans: B

You need which of the following access modes in order to cd to a system directory?
A. t
B. w
C. r
D. x
E. s
Ans: D

What does the Linux “yes” command do?
A. Nothing; it doesn’t exist.
B. It outputs an infinite series of ‘y’s (or the word of your choice).
C. It returns the exit code 0 to indicate success (it’s a synonym to the “true” command).
Ans: B

The ________ command can be used to “kill” the ‘X server’.
A. Ctrl + D
B. Ctrl + Shift + Bksp
C. Ctrl + X
D. Ctrl + Alt + Del
E. Ctrl + Alt + Bksp
Ans: E

nfsstat will…
A. create or update remote NFS users from entries in the file /etc/nfsstat
B. activate kernel threads for the NFS (Network File System) kernel module
C. display an NFS user status on both server and client side systems
D. type statistics on NFS and remote procedure call (RPC) activity for both client and server systems
Ans: D

What is the purpose of the “tset” command?
A. To set a temporary variable.
B. To catch misspellings of the “test” command (they’re the same).
C. None; there is no such command in standard Linux.
D. To control thread execution.
E. To identify and initialize a terminal.
Ans: E

What is the expected output of the following command: unset x; test -z $x && echo 1
A. It depends: an error, if x is not set; nothing otherwise
B. Nothing.
C. 0
D. It depends: an error, if x is not set; 1 otherwise
E. 1
Ans: E

As a non-privileged user, if you use ‘nice’, it will:
A. will lower already running background processes priority
B. reshuffle directory entries, so ls will produce a pretty display
C. execute a command with a set priority (may be higher)
D. execute a command with lower priority
Ans: D

If no filesystems are specified on the command line, and the _____ option is not specified, then the command “fsck” will default to checking filesystems in “/etc/fstab” serial order.
A. -B
B. -A
C. -D
D. -E
E. -C
Ans: B

Which of the following commands shows routing table information?
A. routeshow
B. route –list
C. ip route show
D. ip route get
E. net stat
Ans: C

Man pages are written using what markup language?
D. UTF-8
Ans: B

How are typical native code debuggers implemented?
A. By loading traced program’s code into the heap segment of the debugger which then acts as a virtual machine.
B. By a special system call that allows one process to control and trace execution of another.
C. By requesting the kernel scheduler to suspend the traced process and then analyzing its memory segments.
D. Using virtualization technology.
Ans: B

/bin/true is a command whose exit status is always:
A. 0
B. True
C. False
D. 1
Ans: A

What is cgroups ?
A. Feature to control user permissions
B. Linux kernel feature to control resource usage
C. Command to create new group of users
D. Special group of users, that can use sudo
E. This technology is not implemented in linux
Ans: B

What is the file /etc/nsswitch.conf?
A. tool to configure Ethernet switch
B. a PAM (Pluggable authentication modules) configuration file
C. facility that provides a variety of sources for common configuration databases and name resolution mechanisms
D. Windows manager configuration file
E. name server information
Ans: C

Which command is used for initializing physical volume(hard disk, or partition) for LVM usage?
A. pvmake
B. pvinit
C. lvm -p create
D. pvcreate
E. pvck
Ans: D

To create hard-links instead of copies with the cp command, you use:
A. All of these
B. -l
C. –perm-link
D. –cp
Ans: B

In POSIX-compatible shell, what will you see if you enter “echo foo*” when there are no files beginning with “foo” in the current directory?
A. foo
B. foo*
C. foo*: No such file or directory.
D. echo: No such file or directory.
E. Nothing.
Ans: B

Which one of these lines will check if the directory “foo” exists and create it if it doesn’t?
A. mkdir -p foo
B. test -d foo || mkdir foo
C. if [ ! -d foo ]; then mkdir foo; fi
D. All but one of them.
E. All of them.
Ans: E

What is the maximum size of an ext3 file system?
A. 1 PiB (1,125,899,906,842,624 bytes).
B. 256 TiB (281,474,976,710,656 bytes).
C. 32 TiB (35,184,372,088,832 bytes).
D. There is no theoretical limit.
E. 1 EiB (1,152,921,504,606,846,976 bytes).
Ans: C

Which command will tell you how long a system has been up and running since it was last booted?
A. w
B. who -b
C. cat /proc/uptime
D. All answers are correct.
E. uptime
Ans: D

The cksum command will read from standard input if:
A. All of these
B. ‘.’ is used
C. =’ is used
D. ‘-‘ is used
Ans: D

In a file delimited by commas, what command will print the 3rd column of data:
A. awk -f, ‘{print $3}’
B. awk ‘{print $3}’
C. awk -F, ‘{print $3}’
Ans: C

What does the command “set $(date)” do?
A. It changes the order of the date fields
B. It sets the system date
C. It parses the system date into command line parameters $1 – $6
D. It displays the current system’s setup date
E. It displays the system date
Ans: C

in terms of system calls, when bash process executes cat A. issues the exec system call to execute the cat program and then issues a system call to substitute standard input with /tmp/input
B. issues the exec system call to execute the cat program, then issues a system call to close the lowest file descriptor and finally issues a system call to open /tmp/input
C. issues a system call to create a new copy of itself, in that copy it issues a system call to substitute standard input with /tmp/input and finally issues the exec system call to execute the cat program
D. issues a system call to create a new copy of itself, in that copy it issues a system call to close the lowest file descriptor, then issues a system call to open /tmp/input and finally issues the exec system call to execute the cat program
Ans: D

A. is an invalid command
B. is a configuration file for sendmail located in /var
C. creates a lost+found directory in the root directory /
D. creates a lost+found directory in the current working directory
Ans: D

What are the six fields of /etc/fstab?
A. Device, mount point, file system type, mount options, fsck pass number, dump frequency.
B. Device, mount point, mount options, file system type, fsck pass number, dump frequency.
C. Device, mount point, mount options, file system type, dump frequency, fsck pass number.
D. Device, mount point, file system type, mount options, dump frequency, fsck pass number.
E. Six fields? There are only five: Device, mount point, mount options, and two more fields that are no longer used.
Ans: D

The equivalent to whatis command is:
A. apropos
B. man -f
C. w
D. what -a
Ans: B

The ____ command will display LVM volume groups.
A. vgdisplay
B. lvshow
C. vglist
D. vgl
E. vgstatus
Ans: A

What is the default delimiter for the command “cut”?
A. \n
B. or
D. \0
Ans: E

What is the result of echo ‘$MyVar’ ?
A. MyVar
B. the value of $MyVar
C. $MyVar
Ans: C

modprobe -d:
A. deactivate a module in memory.
B. specifies the directory where modules can be found.
C. deletes a module from the filesystem.
D. deletes a module from memory.
E. types debugging information regarding a module.
Ans: B

A user has a file called OriginalFile, and then creates a hard link to it by executing the following command (brackets not part of command): [ cp -l OriginalFile CopyOfFile ] Which of the following are true?
A. Deleting CopyOfFile will delete OriginalFile
B. Moving OriginalFile to a new directory will cause CopyOfFile to become a broken link
C. All of these are true
D. None of these are true
E. Editing CopyOfFile will affect OriginalFile
Ans: E

Apart from SIGKILL, which other signal cannot be caught nor ignored?
Ans: E

What file will show you how the kernel was started?
A. /proc/bootargs
B. /boot/grub/menu.lst
C. /boot/grub/grub.conf
D. /proc/cmdline
Ans: D

Can `ip` in iproute2 take multiple commands in a row?
A. Yes, using `ip -sequence`
B. Yes, using `ip –file`
C. No
D. Yes, using `ip -batch`
E. Yes, using `ip -f`
Ans: D

The last privileged port (any port that can’t be opened by anyone else but the root user) is:
A. 1023
B. 1025
C. 999
D. 1024
Ans: A

Will tar extract information about file permissions?
A. Yes, if “-p” specified or is root.
B. No.
C. Yes, only if “-p” specified.
D. Yes, only if it’s root.
E. Yes, only on NTFS volumns.
Ans: A

In chgrp command, the letter you use to add a sticky bit (e.g., to prevent removal of files by non-owner from a directory) is:
A. l
B. s
C. y
D. t
Ans: D

newgrp will:
A. create a new group on the system
B. create a new group and potentially add users to it
C. change user’s group ID (GID)
D. change group’s parameters
Ans: C

To block/allow regular users to send write messages to your session, you use:
A. write -q
B. block [-y|-n]
C. term -q
D. mesg
Ans: D

In BASH scripts the symbols “<<” indicate…
A. rapid query
B. much less than
C. left shift
D. input redirection
E. a “here” document
Ans: E

What will you get if you try to read from the pseudo-device /dev/zero?
A. An infinite string of zeroes (‘0’, ASCII 0x30).
B. An infinite string of nulls (‘\0’, ASCII 0x00).
C. Nothing.
D. An error (/dev/zero cannot be read from, only written to).
Ans: B

Which file would be returned by ls File[A5] ?
A. FileAB
B. FileA5
C. none of these
D. FileA
Ans: D

Can you make hard links to directories just as you can to ordinary files?
A. Yes, but only in single user mode.
B. Sometimes, depending on file system restrictions.
C. Yes, there’s no difference between hard linking files / directories.
D. No, that would corrupt the requirement that every file only has one parent directory.
Ans: B

Posted in Linux MCQs | Tagged , , , , , , , , , , , , , | Leave a comment

99 TOP Real Time Google Maps API Development Interview Questions and Answers pdf download

Latest 99 top Google Maps API Development multiple choice questions and answers for freshers and experienced job interview questions pdf

Google Maps API Development Objective type Questions and Answers List

Google Maps API Development Interview Questions                                         Google Maps API Development Interview Questions

Which control contains a Pegman icon that can be dragged onto a map?
A. Overview
B. Pan
C. StreetView
D. Zoom
Ans: C

What is the default map type?
Ans: A

To remove the polyline “flightPath” from a map, which syntax would you use?
A. flightPath.setPolyline = 0;
B. flightPath.setDisplay(null);
C. flightPath.setMap(null);
D. flightPath.setPolyline = null;
Ans: C

How do you add traffic information to a map?
A. map.trafficLayer.setVisible(true);
B. map.addLayer(‘traffic’);
C. var trafficLayer = new google.maps.TrafficLayer(); trafficLayer.setMap(map);
D. var trafficLayer = new google.maps.TrafficLayer(); map.add(trafficLayer)
Ans: C

Which additional library must you load if you want to add a heatmap layer to your map?
A. weather
B. places
C. visualization
D. drawing
Ans: C

For best map display on mobile devices, set the width and height of the

that contains the map to:

A. 600px
B. 100%
C. 80%
D. 50%
Ans: B

In the syntax to load the JavaScript Google Maps API, what does the parameter “sensor=true” indicate?
A. Use weather sensor at map location.
B. Use GPS locator to determine user’s location.
C. Locate landmarks near map location.
D. Show current location of street level camera.
Ans: B

If you want to monetize your map application with context-sensitive display advertising, which library should you use?
A. AdSense
B. Panoramio
C. Places
D. Shopping
Ans: A

What service can be used to obtain a LatLng from an address?
A. Geocoder
B. Geography
C. Distance
D. Directions
Ans: A

What overlay object can be used to contain information HTML content?
A. Bubble
B. Polygon
C. Marker
D. InfoWindow
Ans: D

When you create a new map, you must specify the initial zoom as a map option. What is the other required initial map option?
A. backgroundColor
B. tilt
C. styles
D. center
Ans: D

Street View provides a panoramic view of:
A. 360 degrees
B. 90 degrees
C. 45 degrees
D. 180 degrees
Ans: A

How do you add a click event listener to a google map?
A. map.listener.add(‘click’, clickFunction);
B. google.maps.listener.add(map, ‘click’, clickFunction);
C. google.maps.event.addListener(map, ‘click’, clickFunction);
D. map.addListener.add(‘click’, clickFunction);
Ans: C

Which of the following is not a common MapType?
Ans: C

True or False: The JavaScript Google Maps API does not support reverse geocoding (translating a map location into an address).
A. False
B. True
Ans: A

Which of the following must you obtain to load the JavaScript Google Maps API for a non-business application?
A. Temporary application license
B. Enterprise application license
C. API key
D. Cryptographic key
Ans: C

True or False: When using the JavaScript Google Maps API, you normally specify a

HTML element as a container for the map.
A. False
B. True
Ans: B

True or False: When using the JavaScript Google Maps API, the MapType control appears by default on the map.
A. False
B. True
Ans: B

Which of the following travel modes is not supported when you are calculating directions?
Ans: D

Which arguments must be passed to a LatLng object?
A. Height and width
B. Highway number and mile marker
C. Latitude and longitude
D. Address and ZIP code
Ans: C

True or False: You can use a custom map projection when implementing a custom map.
A. False
B. True
Ans: B

Taking an address and translating it into a geographic point is known as what?
A. Geolocating
B. Geoparsing
C. Geocaching
D. Geocoding
Ans: D

The Google Maps API for which of the following platforms is deprecated?
A. Android
B. JavaScript v3
C. Flash
D. iOS
Ans: C

True or False: You can only create one instance of the JavaScript Map class on a page.
A. True
B. False
Ans: B

Which of the following is not a built-in control that can be used on a map?
A. BirdsEyeView
B. Pan
C. MapType
D. StreetView
Ans: A

Which of the following functions can change the zoom level of the map.
A. map.setCenter
B. map.changeZoom
C. map.setZoom
D. map.zoom
Ans: C

True or False: If you want your JavaScript Google Maps API application to search for places, you must load an additional places library through the bootstrap request.
A. False
B. True
Ans: B

What type of object is the position property of MarkerOptions?
A. google.maps.LatLng
B. google.maps.point;
C. google.maps.LatLngBounds
D. google.maps.Sharpie
Ans: A

Which class is used to display text or images in a popup window attached to a marker?
A. MarkerOptions
B. InfoWindow
C. InfoOptions
D. MapOptions
Ans: B

What function do you call to make the map contain specific bounds.
A. map.fitBounds(LatLngBounds);
B. map.setCenter(LatLng);
C. map.fitBounds(GeographicBounds);
D. map.panTo(LatLng);
Ans: A

What is the correct way to create a Google Maps API object that represents a point on a map?
A. new LatLng(lat:number, lng:number);
B. new IconPoint(lat:number,lng:number)
C. new PointCode(lat:number,lng:number)
D. new Geocode(lat:number,lng:number)
Ans: A

What function sets the HTML contained in an InfoWindow?
A. infoWindow.html(HTMLstring);
B. infoWindow.setContent(HTMLstring);
C. infoWindow.setHTML(HTMLstring);
D. infoWindow.innerHTML(HTMLstring);
Ans: B

What is the namespace on which event listeners must be registered to listen for Google Maps API events?
A. events.maps.google
B. google.api.mapevents
C. google.maps.event
D. google.mapevents
Ans: C

How can you add a marker to an existing map, named “myMap”?
A. marker.setMap(myMap); or var marker = new marker({position:latLng, map:myMap});
B. var marker = new marker({position:latLng, map:map});
C. map.add(marker);
D. marker.setMap(map);
Ans: A

What querystring parameter added to the maps api url will call a named function after the maps api loads?
A. function
B. loaded
C. callback
D. afterload
Ans: C

Which of the following is not an argument for the addListener() event handler?
A. object on which event occurred
B. bubbling phase of event
C. event for which the handler is listening
D. function to respond to event
Ans: B

What overlay object would you use to draw an enclosed shape on the map given an array of LatLng objects?
A. polyline
B. shape
C. marker
D. polygon
Ans: D

How can you determine if the current map viewport contains a specific point?
A. map.getBounds.Overlaps(LatLng)
B. map.getBounds().contains(LatLngBounds);
C. map.getBounds().contains(LatLng);
D. map.contains(LatLng);
Ans: C

Which of the following is not a valid base map type?
Ans: B

Which object defines a geographic rectangle on the map using two LatLng objects?
A. LatLngBounds
B. GeographicBounds
C. LatLng
D. Bounds
Ans: A

What property of MarkerOptions determines where a marker is placed on the map?
A. point
B. center
C. position
D. latLng
Ans: C

What MapOptions properties are required when creating a new map?
A. zoom
B. mapDiv
C. zoom and center
D. center
Ans: C

How can you expand a LatLngBounds object to ensure that it included additional points?
A. latLngBounds.add(newLatLng)
B. latLngBounds.extend(newLatLng)
C. latLngBounds.contain(newLatLng)
D. (none of these)
Ans: B

How can you retrieve an array of markers that have been added to the map?
A. var markers = map.markers;
B. var markers = map.getMarkers();
C. Overlays added to the map are not managed by the map and must be managed manually.
D. var markers = map.getOverlays(“marker”);
Ans: C

Which Map class method is used to animate the transition of the map center to a new LatLng?
A. panTo
B. panBy
C. newCenter
D. panCenter
Ans: A

What property of MarkerOptions allows you to set a custom image for a marker?
A. icon
B. picture
C. markerImage
D. image
Ans: A

What zoom level displays a map of the Earth fully zoomed out?
A. 0
B. 5
C. 20
D. 10
Ans: A

Which property of the DOM enables you to detect iPhone and Android devices?
A. navigator.userAgent
B. device.deviceType
C. navigator.mobile
D. navigator.deviceType
Ans: A

Which of the following is not a type of place search that can be performed with the Places Service?
A. Text
B. Multilevel
C. Nearby
D. Radar
Ans: B

How would you load the data contained in a KML file onto google map?
A. map.loadKml(stringUrl);
B. (none of these)
C. new KmlLayer({url:stringUrl, map:map});
D. map.addKml(stringUrl);
Ans: C

What class can be used to create custom overlays?
A. object
B. OverlayView
C. Marker
D. Overlay
Ans: B

If you create a marker but do not specify its map in the marker options, you can specify the map later by using this syntax:
A. marker.setMap(map)
B. map.setMarker(marker)
C. marker.setMarker(map)
D. map.markerOptions(marker)
Ans: A

When set to true, the draggable property of the DirectionsRenderer class enables a user to:
A. Drag the map to a new center point.
B. Drag the Directions control to a new location.
C. Alter a route by dragging the polyline for the route path.
D. Drag a marker to a new location.
Ans: C

Which class is used to draw an overlay of connected line segments?
A. Drawline
B. Polyline
C. LineOverlay
D. Polygon
Ans: B

Which of the following will call the testFunction function when the div named testDiv is clicked?
A. google.maps.event.addDomListener(testDiv, ‘click’, testFunction);
B. (none of these)
C. google.maps.event.addListener(testDiv, ‘click’, testFunction);
D. google.maps.onClick(testDiv, testFunction);
Ans: A

What is the maximum number of waypoints allowed in a non-business directions request?
A. 12
B. 4
C. 16
D. 8
Ans: D

Which of the following events are fired after the zoom has changed on the map?
A. bounds_changed
B. changed
C. center_changed
D. resize
Ans: A

How would you remove a marker from a map?
A. map.remove(marker);
B. marker.setVisible(false);
C. marker.setMap(null);
D. marker.destroy();
Ans: C

How would you resize the map after its containing element has been resized?
A. google.maps.event.trigger(map, ‘resize’);
B. map.setSize(newSize);
C. map.resize();
D. google.maps.event.trigger(map, ‘resizeMap’);
Ans: A

What property of MarkerOptions defines the rollover text for a marker?
A. markerText
B. rolloverText
C. toolTip
D. title
Ans: D

Which class is used to display the results of a directions query?
A. DirectionsRenderer
B. DirectionsRequest
C. DirectionsResult
D. DirectionsDisplay
Ans: A

Which object should you use to specify that you want to add controls to a map?
A. MapOptions
B. AddControls
C. ControlOptions
D. MapControls
Ans: A

Which of the following is not one of the additional libraries that you can load into a JavaScript Google Maps API application?
A. weather
B. adsense
C. geometry
D. topography
Ans: D

Which function will animate the map to a newly defined center point, provided the change is less than both the width and height of the map?
A. setCenter
B. setZoom
C. panToBounds
D. panTo
Ans: D

What class allows users to draw overlays on the map themselves?
A. OverlayControl
B. OverlayManager
C. DrawingManager
D. DrawingLibrary
Ans: C

Which of the following is not a valid ControlPosition?
A. Center_Bottom
B. Right_Center
C. Top_Right
D. Bottom_Center
Ans: A

What function returns a LatLng based on a pixel position?
A. getPositionOf
B. fromDivPixelToLatLng
C. fromPointToLatLng
D. fromPixelToLatLng
Ans: B

Which map pane should you add an OverlayView to if you want it to respond to click events?
A. overlayImage
B. overlayMouseTarget
C. mapPane
D. overlayLayer
Ans: B

True or False: Direction results from Toronto, Ontario to Milwaukee, Wisconsin will be displayed in miles by default.
A. False
B. True
Ans: A

True or False: MVC state changes pass arguments in their events.
A. True
B. False
Ans: B

What RectangleOptions property allows a rectangle to be resized by the user?
A. editable
B. clickable
C. resizable
D. draggable
Ans: A

How would you add a custom control to a map?
A. map.controls[ControlPosition].push(customControl);
B. map.controls[ControlPosition].add(customControl);
C. map.addControl(customControl, ControlPosition);
D. map.controls.add(customControl, ControlPosition);
Ans: A

Which class is used to create a new map type and apply styles to it?
A. MapType
B. MapTypeControlOptions
C. MapTypeStyler
D. StyledMapType
Ans: D

How can a marker be places so that it is certain to be placed above any other existing markers?
A. marker.setZIndex(google.maps.Marker.MAX_ZINDEX + 1);
B. marker.setZIndex(999);
C. map.addMarker(marker, google.maps.Marker.MAX_ZINDEX + 1);
D. marker.bringToFront();
Ans: A

What object represents a set of x, y coordinates on the map?
A. pixel
B. LatLngBounds
C. position
D. point
Ans: D

In what method of an OverlayView would you initialize html elements to be added to the map?
A. setMap
B. draw
C. onAdd
D. add
Ans: C

Which object is the most atomic unit of the route returned in response to a directions request?
A. DirectionRoute
B. DirectionStep
C. DirectionLeg
D. DirectionResult
Ans: B

How do you extend a LatLngBounds object to contain another LatLngBounds object?
A. latLngBounds.add(otherLatLngBounds);
B. latLngBounds.union(otherLatLngBounds);
C. (all of these will work)
D. latLngBounds.expand(otherLatLngBounds);
Ans: B

What method of an OverlayView would the overlay’s html elements be in?
A. add
B. onAdd
C. setMap
D. draw
Ans: D

How would you call the function testFunction only the first time the map is loaded?
A. google.maps.event.addListenerOnce(map, ‘idle’, testFunction);
B. google.maps.event.addListenerOnce(map, ‘load’, testFunction);
C. google.maps.event.addListener(map, ‘load’, testFunction);
D. google.maps.event.addListener(map, ‘idle’, testFunction);
Ans: A

Posted in Google Maps API Development Questions and Answers | Tagged , , , , , , , , , , | Leave a comment

99 TOP Real Time Google App Engine Interview Questions and Answers pdf download

Read the most frequently asked 99 top Google App Engine multiple choice questions and answers for freshers and experienced job interview questions pdf

Google App Engine Objective type Questions and Answers List


When programming your app to search for atom data, what will it search for?
A. Movies.
B. Music.
C. Pictures.
D. RSS feeds.
Ans: D

What is the shortest and longest duration you can set cookie expiration?
A. One year, ten years.
B. One month, two years.
C. One day, two weeks.
D. One week, two months.
Ans: C

Why does Python in App Engine use the native JSON library?
A. It is slower, but more stable than simplejson.
B. It costs less than simplejson.
C. It is much faster than simplejson.
D. It is slower and less stable than simplejson, but more secure.
Ans: C

Can you sign into the App Engine Admin Console with your google account?
A. Yes. Though you must set up a new screen name and password.
B. No. You need a new Google App Engine account.
C. No. You must sign in with your Python compiler account.
D. Yes.
Ans: D

When coding the users API with Go, why would a programmer include an opaque value?
A. So App Engine doesn’t consume too many resources.
B. To keep App Engine from freezing.
C. So App Engine doesn’t get viruses.
D. So the Go App Engine SDK can communicate with App Engine.
Ans: D

What two programming languages do App Engine’s tools use?
A. C++ and Visual Basic.
B. PHP and C#
C. Python and Java
Ans: C

What is the name of the feature that allows applications to be served via both HTTPS and HTTP through the custom domain?
A. SSL for Custom Domains
B. Users
C. App Identity
D. Traffic Splitting
Ans: A

If you want to develop your app using Java, what is necessary before starting?
A. Python compiler.
B. Java developer suite.
C. App Engine Java software development kit
D. The Borland C++ compiler.
Ans: C

What is one of the languages you can write apps in?
A. Cobal
B. Java
C. C
D. C++
Ans: B

What is Google App Engine for?
A. Google App Engine is for detecting malicious apps.
B. Google App Engine is for running web applications on Google’s infrastructure.
C. Google App Engine replaces the modern computer.
D. Google App Engine is a system to develop hardware interfaces.
Ans: B

When Java programming for App Engine, what a preferred development kit?
B. Boreland C++ Compiler.
C. Eclipse
D. Prestruct-c.
Ans: C

What is the default daily limit for emails customers can send using billing service? Not counting Admin Emails (3,000,000 mails per day)
A. Depends on which billing system the application is using.
B. 100,000 messages
C. 1000 messages
D. 100 messages
Ans: A

What does AppStats do?
A. It is an app that tells you how your computer is performing.
B. It tells you which apps are selling the best.
C. It is an app that tells you how someone else’s computer is performing.
D. It measures your app’s performance.
Ans: D

Does the Python runtime environment include a Python interpreter?
A. Yes, but it needs to be enabled in the .conf file.
B. No, it has to be purchased from the Python store.
C. No, but it can be added later.
D. Yes
Ans: D

Users API allow users to grant a third party or application limited permission to access your app on his or her behalf without sharing credentials using the OAuth protocol
A. Correct
B. Only for Java
C. Only for Python
D. Incorrect
Ans: A

Within Google App Engine, is the global interpreter lock still applicable?
A. Yes.
B. Yes, but it needs to be enabled in the .conf file.
C. No, it has to be downloaded and implemented with a script.
D. No, but it can be added later.
Ans: A

GAE contains several runtime environments including: Java, Python, ____, and ____
A. C#, MySQL
B. .Net, Ruby
C. PHP, Go
D. Closure, Scala
Ans: C

What is the current preferred version of Python for App Engine?
A. Python 2.5
B. Python 3.0
C. Python 1.5
D. Python 2.7
Ans: D

Python 2.7 will use multi-threading technology. Why is this important for Google App Engine?
A. It reduces the amount of time for RPCs to complete.
B. It increases the time for RPCs to complete.
C. It completes RPCs in the same amount of time as the previous version.
D. It circumvents RPCs entirely.
Ans: A

What scalable technologies is App Engine based off of?
A. BigBird and GFS
B. BigTable and GFS
C. TableBig and DFS.
D. BigCharts and YFS.
Ans: B

Do you have to use a server to upload your application?
A. No, it is already provided.
B. Yes. It is highly recommended to upload to GitHub.
Ans: A

True or false? Generally available (GA) features have many sections. For instance section “Data storage, retrieval, and search” covers both PHP and Python environments for 100%.
A. Incorrect, it covers only PHP for 100%
B. Incorrect, there is no PHP environment supported by GAE
C. Incorrect, there is no “Data storage, retrieval, and search” section among GA features
D. Partially correct
Ans: D

What is the right link to the Cloud Console?
A. https://cloud.google.com/console#
B. https://ae.google.com/console#
C. https://console.google.com/cloud#
Ans: A

What does App Engine scheduler do?
A. It designates a date that your app should be completed.
B. It routs incoming requests to be served by your app’s instances.
C. It schedules your app to be introduced to the public.
D. It schedules a time for your app to be run for the first time.
Ans: B

Google Cloud SQL features:
A. Lets your application read files from and write files to buckets in Google Cloud Storage, with with internal error handling and retry logic.
B. A fully-managed web service that allows you to create, configure, and use relational databases that live in Google’s cloud.
C. Enables support for outbound sockets using the language-specific, built-in libraries.
D. Lets developers factor large applications into logical components that can share stateful services and communicate in a secure fashion.
Ans: B

What is the safety measure to prevent unintended deletion of apps?
A. Google App Engine must be deleted.
B. Google App Engine must be disabled.
C. Apps must first be disabled.
D. Google App Engine must be disconnected from the web.
Ans: C

Which one feature from the given Communication features does not exist in GAE?
A. Google Cloud Endpoints
B. URL Fetch
D. Channel
Ans: C

Is BigTable distributed outside of Google?
A. Yes. It must be purchased in the app store.
B. Yes, but from only select sources.
C. Yes, it is distributed by thrid-party venders.
D. It is proprietary.
Ans: D

What kind of environment would a Go application be tested in?
A. It should be released to the public via Google App Store for testing.
B. A live environment.
C. A sandboxed environment.
D. It should be tested in a non-sandboxed environment that allows it to use all resources.
Ans: C

GAE has set of Tools, select a tool which does not exist in Datastore toolset
A. Ereporter
B. Datastore Statistics
C. Datastore SQLite Stub
D. Bulk Loader
Ans: A

Why does App Engine include a sandbox?
A. So external software can’t attack your newly created program.
B. Because it is required by law.
C. For the sake of running more efficiently while developing.
D. So apps run in a secure environment.
Ans: D

What is the 1 GB price per month for the disk space after exceeding 1 GB?
A. $13 per GB per month
B. $1.3 per GB per month
C. $0.13 per GB per month
D. $0.013 per GB per month
Ans: C

User feature of GAE allows application to sign in users with:
A. OAuth and SAML only
B. Google Accounts or OpenID
C. Google Accounts only
D. Google Accounts, OAuth and SAML only
Ans: B

What framework are you using when developing in Python?
A. webappnew
B. webapp2
C. webapp7
D. webapp10
Ans: B

The Viewer role has access to the admin Console to perform:
A. Request logs
B. Upload/rollback application code, update indexes/queues/crons
C. Download Charts
D. Upload/rollback application code, update indexes/queues/crons
Ans: A

When setting up Python Imagine Library, you must declare the library in what file?
A. app.conf
B. goog.conf
C. app.ggl
D. app.yml
Ans: D

Which item is not an official address/hashtag of the Platform?
A. #appengine on Twitter
B. /r/app_engine on reddit
C. @app_engine on Twitter
D. #appengine in G+
Ans: B

The capacity of the dedicated memcache in GAE is:
A. 1 to 20GB
B. 10 to 200GB
C. 5GB
D. No guaranteed capacity
Ans: A

If you wish for your datastore to be read-only, what do you click?
A. “Disable-writes”
B. “Read-only”
C. “Disable-reads”
D. “Write-only”
Ans: A

App Engine does not support certificate type:
A. Single Domain/Hostname
B. DigiCert Extended Validation Multi-Domain Certificate (EV MD)
C. WildCard
D. Self-signed
Ans: B

What does App Engine use to manage domains?
A. Google Domain Engine
B. Google App Domain Companion.
C. Google Apps
D. App Domain Manager
Ans: C

What is the preferred Datastore when programming with Python 2.7?
A. High Repetition Data Store
B. High Replication Datastore
C. High Resolution Data Store.
D. Google Data Store
Ans: B

GAE supports two classes of the memcache service: shared and dedicated. What is the price of the dedicated memcache service per GB per hour?
A. Free
B. $0.12
C. $1.2
D. $0.012
Ans: B

Select Third-party service or Experimental feature, which does not exist in GAE partner program and in the list of features:
A. Twilio (SMS/Voice)
B. Skype(Text/Voice)
C. SendGrid (Email)
D. MapReduce
Ans: B

If your application tries to serve a large response through PageSpeed, PageSpeed truncates it at:
A. 1Mb
B. 32Mb
C. 1Gb
D. 2Gb
Ans: B

For Enabling Push-to-Deploy a developer does not need to:
A. create a “netrc” file in his local development environment
B. have an SSL certificate
C. grant remote access permissions to his Google accoun
D. receive a corresponding auth token
Ans: B

How many types of instances does GAE offer?
A. Three: Frontend, Backend, SQL Server
B. Four: Frontend, Backend, SQL Server, *nix Disk Image
C. Five: Frontend, Backend, SQL Server, *nix Disk Image, Windows Disk Image
D. Two: Frontend and Backend
Ans: D

When accessed via SSL, what protocol is automatically used with Go?
Ans: A

What happens to the non-applicable java.lang.System class in App Engine?
A. You can choose to enable it via the configuration file.
B. It is disabled.
C. It is re-enabled.
D. Google App Engine automatically downloads the dependencies.
Ans: B

What happens to the request handler after 60 seconds?
A. The request handler uninstalls Java 7.
B. The handler is interrupted.
C. The handler shuts the program down.
D. The request handler disconnects Google App Engine from the web.
Ans: B

Select the item that does not exist in the list of Channel resources.
A. Channels Created
B. Channel HTTP Requests
C. Channel Hours Requested
D. Channel API Calls
Ans: B

Select the customer’s daily limit for Read and Write operations in Datastore.
A. 50,000 for each one
B. 120,000 in toto for both Read and Write operations
C. 50,000 in toto for both Read and Write operations
D. 120,000 for each one
Ans: A

Lets review some limits and quotas of SSL for a Custom Domain section: The limit of Mappings per certificate is 20. What is the limit of Certificates per account?
A. 400
B. 20
C. 10
D. 40
Ans: B

What is the default cost of Frontend class per hour per instance?
A. $0.8
B. $0.08
C. $0.12
D. $0.008
Ans: B

In order to perform SMS and Voice Integration With Twilio last one must know how to read TwiML instructions. Select inappropriate instruction or right instruction with wrong description
A. – play a message for the caller
B. – receive an SMS
C. – record the call
D. – text to speech
Ans: B

To complete Migrating to the High Replication Datastore, you might NOT need to:
A. Create a duplicate of your Master/Slave application using the HRD.
B. Deploy the new HRD application.
C. Migrate data using the Migration Tool.
D. Make a copy of repository.
Ans: D

There is no such APIs in GAE such as
A. Urlfetch
B. Taskqueue
C. HR Datastore
D. Mail Service
Ans: D

How many roles does GAE provide to get access to the Admin Console?
A. Two: Viewer, Developer
B. Four: Viewer, Developer, Owner, Admin
C. Five: Viewer, Developer, Owner, Admin, Operator
D. Three: Viewer, Developer, Owner
Ans: D

The App Engine SDK does not support Java runtive environment with version below:
A. 7
B. 5
C. 6
D. 4
Ans: A

When reading blobs in Java, what is necessary?
A. BlobReader
B. BlobTech
C. BlobstoreInputStream
D. BlobView
Ans: C

In addition to sending email, SendGrid can help you receive email or make sense of the email
A. that are marked as SPAM
B. you are not going to send
C. you are going to send
D. you’ve already sent
Ans: D

What is the free default limit for the Blobstore Stored Data resource?
A. 1 GB
B. 2 GB
C. 10 GB
D. 5 GB
Ans: D

GAE has set of Tools, select a tool which does not exist in App Development toolset
A. Datastore SQLite Stub
B. Local Unit Testing
C. AppStats
D. Garbage Collector (for Java only)
Ans: D

What is the correct url to GAE Admin console?
A. https://your-domain.com/a
B. https://your-domain.com/admin
C. https://appengine.google.com/admin/your-domain.com
D. https://appengine.google.com/a/your-domain.com
Ans: D

In relation to client organizations, what does the multilatency feature do?
A. Compartmentalizes your data.
B. Encrypts your data.
C. Distributes your data to third parties.
D. Compresses your data.
Ans: A

What do you use to measure the performance of your app once it starts sending email?
A. Performance API
B. Task Manager API
C. Event API
D. Google Monitor API
Ans: C

Why would you wish to write your code in a sandboxed environment?
A. To decrease the chances of piracy.
B. To shut down malicious and intrusive software.
C. To increase the resources you are consuming.
D. To isolate untested code changes.
Ans: D

The Task Queue Tool or Resource does not contain subtool or subresource
A. Development Console
B. Deferred Library
C. Task Queue Storage Limits
D. Transactional Tasks
Ans: A

What is one of Go API’s Context object’s methods of sending log messages to App Engine?
A. fofnl
B. InfoGo
C. GoInfo
D. Infof
Ans: D

What do you use to send emails with Google App Engine?
A. MailGrid
B. SendMail
C. SendGrid
D. AppMail
Ans: C

Within Google App Engine, is Java 7 backwards compatible with Java 6?
A. Yes, but only when applicable.
B. No. Java 6 must be uninstalled before installing Java 7.
C. Yes. All features in Java 6 and Java 7 work cumulatively, even if the processes are redundant.
D. No. Java 7 disables Java 6 features.
Ans: A

App Engine supports two types of SSL for custom domains. You can configure your domain to use either or both. Their names are:
A. Server Name Indication (SNI) and Virtual IP (VIP)
B. TLS 1.2 and SSL 2.0
C. GlobalSign ExtendedSSL and GlobalSign OrganizationSSL
D. GlobalSign ExtendedSSL and GlobalSign DomainSSL
Ans: A

List of Available Charts in GAE management Console does NOT include:
A. Summary
B. Requests by Type (Queries/Second)
C. Milliseconds Used/Second
D. Disk space usage (MB)
Ans: D

GAE SDK for Go works fine for:
A. Mac OS X 64-bit
B. There is no such environment like Go in Google App Engine
C. in Linux 64-bit, Linux 34-bit, Windows 64-bit, Windows 32-bit and only for the given platforms
D. in Linux 64-bit, Linux 34-bit, Windows 64-bit, Windows 32-bit and only for the given platforms
Ans: A

After creating (migrating to) Premier account, an application will be available at
A. *.appspot.com
B. *.appspot.google.com
C. *.apppool.com
D. *.appspool.com
Ans: A

What is the Daily Limit and Maximum Rate for the Channel API Calls if you are not paying for the service?
A. 657,000 calls ; 3,000 calls/minute
B. 657,000 calls ; 300 calls/minute
C. 65,700 calls ; 300 calls/minute
D. 65,700 calls ; 3,000 calls/minute
Ans: A

App Engine supports any Python code that uses the:
A. HTTP protocol
B. WSGI interface and only it
C. CGI standard
Ans: C

How would you use Java and App Engine to write to the filesystem?
A. Disconnect from the Internet and Google App Engine automatically writes to the disk.
B. Edit the configuration file accordingly.
C. You cannot write to the filesystem with the exception of resource files.
D. Invoke an instance of Google App Engine within the sandbox and it will then write to the disk.
Ans: C

Precompilation is a tool that is enabled by default. What is it used for?
A. Enhancing the performance of your app.
B. Preparing your app for use in the sandbox.
C. Precaching your system resources to run App Engine better.
D. Stabilizing your system so your app will stay in the sandbox.
Ans: A

Once you have surpassed the capabilities of SendGrid, what should you use to send email?
A. Gmail API
B. Outbound Parse API
C. App Engine Parse
D. Inbound Parse API
Ans: D

Posted in Google App Engine Questions and Answers | Tagged , , , , , , , , , , , , , | Leave a comment

99 TOP Real Time Networking Firewall Interview Questions and Answers pdf download

Read the most frequently asked 99 top Networking Firewall multiple choice questions and answers for freshers and experienced job interview questions pdf

Networking Firewall Objective type Questions and Answers List


What firewall based technology would you use to create a secure tunnel connection from a corporate headquarters to a remote branch office?
B. Tunnel
D. Radius
Ans: A

When configuring a firewall to deny port 3389 to a RDP server that is to receive the SYN packet, what is the address?
A. Flag
B. Destination
C. Source
D. Connected
Ans: B

Which of the folllowing firewalls keeps track of the state of network connections ?
A. Static filtering
B. Stateless inspection
C. Stateful inspection
D. Dynamic Filtering
Ans: C

What is a DMZ zone?
A. Dual Master Zone
B. DeMilitarized Zone
C. Donor Master Zone
D. Dedicated Master Zone
Ans: B

Your client asks you to create a rule for FTP access, what port(s) will you add on the firewall?
A. 20 and 21
B. 20
C. 8021
D. 2121
Ans: A

Which of the following 8-bit values identifies the maximum time the packet can remain in the system before it is dropped?
A. fragment
B. time to live
C. checksum
D. protocol
Ans: B

Which TCP port is used by Telnet?
A. 110
B. 80
C. 23
D. 72
Ans: C

What is the primary purpose of a firewall?
A. Enables fast forwarding
B. Route frames
C. Route hot packets
D. Inspect packets
Ans: D

Which of the following server creates a secure tunnel connection?
B. tunnel
C. authentication
Ans: D

Your customer asks you to allow ALL hosts from the Internet to company’s secure webserver (Secure HTTP), what port do you open on the firewall?
A. 23
B. 22
C. 443
D. 43
Ans: C

FTP uses which of the following port as control port?
A. 21
B. 22
C. 20
D. 23
Ans: A

Which of the following is not a recognized generation of Firewall?
A. First Generation
B. Third Generation
D. Second generation
Ans: C

What device logically filters traffic at the edge of a computer network and the Internet?
A. Switch
B. Firewall
C. Router
D. Hub
Ans: B

Which of the following is TRUE?
A. The firewall may be a separate computer system, a software service running on an existing router or server, or a separate network containing a number of supporting devices
B. All of the given options are correct
C. Firewalls can be categorized by processing mode, development era, or structure
D. Firewalls categorized by which level of technology they employ are identified by generation, with the later generations being more complex and more recently developed
Ans: B

You want to filter all traffic going to an internal web server from the Internet side of the firewall, what port will you filter on the firewall?
A. 8080
B. 80
C. 21
D. 25
Ans: B

In an IP packet header, which of the following is the address of the computer or device that is to receive the packet?
A. total length
B. source address
C. flag
D. destination address
Ans: D

What port does FTP use for the control port?
A. 20
B. 23
C. 21
D. 22
Ans: C

Which of the following firewalls works at the application level?
A. Packet filtering firewal
B. application-level firewalls
C. circuit firewall
D. MAC layer firewalls
Ans: B

Which port does secure HTTP use?
A. 442
B. 8080
C. 443
D. 441
Ans: C

What application controls what information is transmitted or received from an external source destined to a server, workstation, or computer that is based on a preset of rules and/or user preferences?
A. Server
B. Repeater
C. Router
D. Firewall
Ans: D

Some firewalls deploy a technology that allows monitoring of traffic in and out of a network and alerts network staff when suspicious traffic patterns occur.
A. Router
C. Hub
D. Switch
Ans: B

Which of the following firewalls keeps track of the connection state?
A. Packet filtering firewall
B. Stateful packet filtering firewall
C. Application layer firewall
D. Router enhanced firewall
Ans: B

You are a network administrator and you have been asked to add a deny all ICMP firewall stated that is sourced from the Internet; you add a deny all for ICMP, what common command would you use to test your newly added rule?
A. Traceroute
Ans: C

What is a host based firewall?
A. Software firewall installed on a server/workstation/desktop
B. A proxy server configured to handle http requests
C. A device that is installed by your Internet Service Provider
D. A Firewall connected directly to the Network Interface Card of a Computer
Ans: A

When referring to firewall concepts, what are application level gateways?
A. HTTP servers
B. Proxy servers
C. IP Servers
D. HTTP servers
Ans: B

Packets contain an 8-bit value that determines the maximum time the packet can remain the CPU, Memory, and Buffer circuits of a firewall before it is dropped or discarded, what is this called?
A. Protocol
B. Time To Live
C. Fragment
D. Checksum
Ans: B

When designing a network that consists of a firewall, the firewall design needs to be “BLANK” so that it can grow with the network it protects.
A. Cost effective
B. Robust
C. Scalable
D. Expensive
Ans: C

The Windows based program, ZoneAlarm is an example of a “BLANK” firewall?
A. Software
B. Business
C. Corporate
Ans: A

What types of firewalls are able to analyze the contents of packets and the IP headers for signs that the traffic is legitimate?
A. Stateless
B. Software
C. Boundary
D. Stateful
Ans: D

Which of the following is another term for a packet of digital information?
A. header
B. data
C. datagram
D. footer
Ans: C

Which of the following is not a VALID basic criteria for rule in the firewall policy?
A. Destination
B. User
C. Service
D. Source
Ans: B

Which of the following valid OSI layer are covered by packet filtering firewall operation ?
A. Network layer
B. Transport layer
C. At the Application layer
D. Both Transport layer and Network layer
Ans: D

The practice of designing operational aspects of a system to work with a minimal amount of system privilege is called:
A. IP forwarding
B. least privilege
C. access denied
D. failover firewall
Ans: B

When referring to firewalls, what does SPI Stand for?
A. Stateless Packet Inspection
B. Shared Packet Interconnection
C. Stateful Packet Inspection
D. Source Packet Information
Ans: C

Ports up to which of the following are called well-known ports?
A. 1025
B. 255
C. 1023
D. 1500
Ans: C

Which particular firewall usually consists of two separate firewall devices?
A. Application –level firewall
B. MAC layer firewalls
C. Hybrid Firewall
D. Dynamic Filtering
Ans: C

What main attributes are used at layer 4 of the OSI model to filter traffic on a firewall?
A. Frames and packets
B. Source and/or destination IP Addresses
C. Source and/or destination TCP/UDP ports
D. ICMP and IP
Ans: C

When packets are being processed by a hardware firewall, one of the several steps in processing the packets is an error-checking procedure that is performed in the trailer section of an IP Packet, this is called what?
B. IPC (IP Check)
Ans: C

Which type of firewall involves firewall software installation directly on the user’s system?
A. Third Generation
B. Residential –Grade Firewall
C. Commercial –Grade Firewall
D. Fourth Generation
Ans: B

Which of the following are the most common restrictions implemented in packet filtering firewalls?
A. All of the given options are valid
B. IP source and destination address
C. Inbound Direction
D. Outbound Direction
Ans: A

When troubleshooting the flow of packets through a firewall, a datagram is called what at the network layer of the OSI model?
A. Frames
B. Packets
C. Segments
D. Bits
Ans: B

What port do most DDOS DNS attacks occur on?
A. 161
B. 80
C. 53
D. 443
Ans: C

Which of the following firewall makes the filtering decision based on the media access control address of the source/destination of a packet ?
A. MAC layer Firewalls
B. Packet Filtering
C. Circuit Gateways
D. Application Gateways
Ans: A

Zone Alarm is an example of which type of firewall?
A. proxy
C. corporate
D. personal
Ans: D

The basic concept of a SYN flooding attack lies in the design of what handshake that begins a TCP connection?
A. 4-way
B. 2-way
D. 3-way
Ans: D

What it is called when a packet arrives at a firewall, gets analyzed and determines that no connection exists and the packet is dropped?
A. Stateful Packet Inspection
B. Connection Oriented Inspection
C. Stateless Packet Inspection
D. Stateful Frame Inspection
Ans: A

A stateful firewall maintains which of the following?
A. bridging table
B. connection table
C. routing table
D. state table
Ans: D

What happens when a packet arrives on an interface and a route exists in the local routing table and the firewall routes the packet back out the same interface the packet arrived on?
A. Interface will get disabled due to a routing conflict
B. The Packet is allowed, but marked as low priority
C. The Packet is dropped
D. Poison reverse routing is disabled and the packet is allowed
Ans: C

What specific chip design allows firewalls to accelerate packet processing to analyze and filter packets between an untrusted and trusted network?
B. Intel X86
Ans: D

What technology is used on firewalls that process stateful packet inspections at the hardware level and as close to the line rate as possible?
C. Intel
Ans: B

True/False: Application proxy firewalls are faster than Stateful Packet Inspection firewalls.
A. False
B. True
Ans: A

Which of the following firewall’s filtering process can be either Stateful, Stateless or both ?
A. Circuit Gateways
B. Application Gateways
C. Packet Filtering
D. MAC layer firewalls
Ans: C

What device should be the front line defense in your network?
A. Network Layer Firewalls
B. Application Based Firewalls
C. Packet Filtering Firewalls
D. Stateful Packet Inspection firewall
Ans: D

What kind of firewall is the opensource IPtables firewall commonly found on Linux Distros?
A. Connection oriented firewall
B. Stateful
C. Zone Based
D. Stateless
Ans: B

Which particular generation firewall are stateless in nature ?
A. Second generation
B. Third Generation
C. Fourth Generation
D. First Generation
Ans: D

A Stateful Packet Inspection firewall maintains a “BLANK”, which is also just a list of active connections.
A. NAT Table
B. Routing Table
C. Connection Table
D. State Table
Ans: D

Ports up to “BLANK” are considered well known ports.
A. 65536
B. 1024
C. 1023
D. 65524
Ans: C

True/False: NAT is considered as a firewall technology.
A. True
B. False
Ans: B

What kind of firewall is the integrated Microsoft Windows firewall application?
A. Stateful
B. Stateless
C. Zone Based
D. Connection oriented firewall
Ans: A

A “BLANK” flowing through a firewall is another term for a packet of digital information.
A. Frame
B. Datagram
C. Data
D. Packet
Ans: B

Network-based firewalls and Host-based firewalls are valid categories of which of the following firewall ?
A. Circuit Gateways
B. Hybrids
C. Application –level firewall
D. MAC layer firewalls
Ans: C

What do circuit layer Firewalls monitor?
A. Transport Handshaking
B. TCP Handshaking
C. IP Handshaking
D. UDP Handshaking
Ans: B

Which of the following is not a VALID subset of packet filtering firewalls?
A. Stateless inspection
B. Dynamic Filtering
C. Stateful inspection
D. Static filtering
Ans: A

A dynamic or Stateful Packet Inspection firewall maintains active “BLANK” sessions and “BLANK” pseudo sessions.
A. Server and Host
B. Stateful and Stateless
C. TCP and UDP
D. IP and ICMP
Ans: C

Which of the following is not a VALID processing –mode category of firewalls?
A. Proxy firewalls
B. Circuit gateways
C. Packet filtering Firewalls
D. Application gateways
Ans: A

What is a Cisco Access Control List (ACL) considered as?
A. Controlled
B. Stateful
C. Stateless
Ans: C

Which of the following is a mechanism designed into operating system kernel ?
A. Second generation
B. Third Generation
C. Fifth Generation
D. First Generation
Ans: C

Which of the following servers in the DMZ needs only list a limited number of public IP addresses?
C. proxy
D. firewall
Ans: A

Which of the following is FALSE about Circuit Gateways?
A. Circuit Gateway firewalls provide a common access mechanism which is not dependent on the destination application
B. Circuit Gateway firewalls provide a unique access mechanism based on the destination application
C. Circuit gateways firewalls DO NOT look at data traffic flowing between one network and another
D. Firewall operates at the transport layer
Ans: B

Which generation firewalls are stateful inspection firewalls?
A. Second generation
B. First Generation
C. Fourth Generation
D. Third Generation
Ans: D

In an IP packet header, which of the following describes the length of the header in 32-bit words and is a 4-bit value?
A. total length
B. fragment offset
C. header checksum
D. Internet header length
Ans: D

Which of the following can have different components of the firewall for different systems?
A. dual-homed firewalls
B. packet filtering routers
C. screened subnet firewall
D. Screened Host Firewalls
Ans: D

What layer(s) does an SPI firewall generally operate at?
A. Application
B. Network
C. D and F
D. Data Link
Ans: C

Which of the following is not a vaild categorization of Firewall based on structure?
A. residential grade
B. application-based
C. hardware-based
D. commercial-grade
Ans: B

What layer of the OSI model do Circuit Layer Firewalls operate at?
A. Application Layer
B. Session Layer
C. Transport Layer
D. Network Layer
Ans: B

Which of the following is not a vaild categorization of Firewall based on processing mode?
A. Application filtering
B. Packet filtering Firewalls
C. Application gateway
D. Circuit gateway
Ans: A

Which level proxy provides protection at the session layer of OSI?
A. circuit
B. application
C. server
D. proxy
Ans: A

Which of the following is an INVALID common architectural implementation of firewall?
A. packet filtering routers
B. Dynamic Filtering
C. dual-homed firewalls
D. screened host firewalls
Ans: B

Which of the following host is sometimes called a dual-homed gateway or bastion host?
A. proxy
B. blocked
C. stub
D. sceened
Ans: D

Which generation firewalls are either application-level firewalls or proxy servers?
A. Second generation
B. Third Generation
C. First Generation
D. Fourth Generation
Ans: A

Posted in Networking Firewall Questions | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

100 TOP Real Time Dojo Interview Questions and Answers pdf download

Read the most frequently asked 100 top Dojo multiple choice questions and answers for freshers and experienced job interview questions pdf

Dojo Objective type Questions and Answers List

Dojo Questions and Answers

Dojo Questions and Answers

What is Dijit?
A. Dijit is Dojo’s AMD loader.
B. Dijit is Dojo’s UI Library.
C. Dijit is Dojo’s math library.
D. Dijit is Dojo’s git interface.
E. Dijit is Dojo’s interface to the jQuery effects functions.
Ans: B

How do you use dojo/query to get all elements with class “foo”?
A. query(“class:foo”);
B. query(“foo”);
C. query(“#foo”);
D. query(“.foo”);
Ans: D

What is a dijit?
A. A framework
B. A type
C. An object
D. A widget
Ans: D

Which code loads the dijit/form/Button module and waits until HTML has been loaded and processed?
A. (none of these)
B. (dojo/domReady!).wait([“dijit/form/Button”], function(Button) { // Do something });
C. require([“dijit/form/Button”, “dojo/domReady!”], function(Button) { // Do something });
D. try { dojo/DomReady!(); } catch (e) { load “dijit/form/Button”; }
E. when.DomReady.use (“dijit/form/Button”, function(btn){ // Do something });
Ans: C

What does dojo DojoX handle?
A. Foundation elements of Dojo
B. The Dijit widgets
C. Extensions and experimental code from the Dojo team and third party
D. Deprecated code
Ans: C

What are the two ways to add Dijit widgets?
A. none of these
B. programmatically and declaratively
C. inline and included
D. with style tags
E. using PHP
Ans: B

What does Dojo Dijit provide?
A. UI widgets
B. XHR, AJAX, inheritance, packaging, query, etc
C. Extensions from Dojo team and third party
D. Internationalization, accessing data stores, effects, back-button handling, etc
Ans: A

What does dom.byId() return?
A. Reference to the document
B. Reference to the dijit
C. Reference to the DOM element
D. An event handler
Ans: C

How do you load Dojo on your HTML page?
A. Include _base.js
B. Include dojo.js
C. Include main.js
D. Include html.js
Ans: B

What is JSON?
A. JavaScript Optimized Node
B. JavaScript Optimal Notation
C. JavaScript Original Notation
D. JavaScript Object Notation
E. JavaScript Origin Node
Ans: D

When should you use a built version of Dojo?
A. A built version of Dojo eliminates the need for public and private caching, speeding delivery with redundant requests.
B. The Dojo build process should only be used for mobile device applications.
C. A built version of Dojo should be used when you need to minimize the amount of code downloaded and the number of requests made.
D. There is no build system for Dojo. The advantages of AMD eliminate the need for builds.
E. You should never use a built version of Dojo.
Ans: C

What are the main packages of Dojo?
A. Firefox, IE, Chrome, and Safari
B. Dojo, Dijit, DojoX, and util
C. AMD, Ajax, fX, and GUI
D. desktop, tablet, and mobile
E. layout, design, font, and effects
Ans: B

What does the dojo/_base/declare module contain?
A. dojo/_base/declare creates the site infrastructure and language encoding.
B. dojo/_base/declare contains functions to define Dojo classes, which support standard Object Oriented concepts within Dojo.
C. dojo/_base/declare contains JSON extensions to allow cross-domain request completion.
D. All of these.
E. dojo/_base/declare is used to explicitly declare variables for high precision computations.
Ans: B

What does Dojo Util provide?
A. Dojo Util contains utility scripts including build, shrink, test and documentation support
B. Internationalization, accessing data stores, effects, back-button handling, etc
C. Utilities specific to widgets
D. XHR, AJAX, inheritance, packaging, query, etc
Ans: A

What server-side technology can Dojo work with?
A. Dojo works only with Microsoft technology and performs best with Internet Explorer, version 6.0 and earlier.
B. Dojo works only with PHP and Java. Other languages integrations are being developed and expect to be deployed by the end of 2013.
C. Dojo is a client-side, back-end agnostic technology that can be used in conjunction with ANY server-side technology.
D. The Java in JavaScript means that Dojo only works with Java code, on both the client and server-side.
E. Dojo does not work with ANY server side technology. Web applications that use Dojo must load ALL data and content prior to execution because once the page is loaded additional requests are impossible.
Ans: C

What is dojo/store?
A. dojo/store is an uniform interface for the access and manipulation of stored data.
B. dojo/store captures screen shots to support debugging and cross-browser testing.
C. dojo/store is used for ecommerce applications because it provides encryption within the front-end for security.
D. dojo/store is used to buffer keystrokes and mouse events to allow synchronous processing.
E. dojo/store is used only on the Konquerer browser as a shim.
Ans: A

lang.replace(“title/{home}/{page}”, {home: “dojo”, page:”″}) produces what result?
A. “title/{home}/{page}”
B. “title/{home}/”
C. “title/dojo/”
D. “title/dojo/{page}”
Ans: C

How do you import a module? (in this case dojo/query)
A. define([dojo/query], {});
B. require([dojo/query], {});
C. require([“dojo/query”], {});
D. define([“dojo/query”], {});
Ans: C

To create a Dijit button widget, what module must be used?
A. dijit/form/Button
B. Dojo/Button/Widget
C. dojo.dijit.form.Button
D. buttonWidget
E. Dijit/widget/Button
Ans: A

When does the function in require([“dojo/domReady!”], function() {}); execute?
A. When the DOM has finished loading
B. After Dojo has loaded but before the DOM is ready
C. dojo/domReady! is not a valid Dojo module
D. It will give an error since domReady was not passed in as a parameter
Ans: A

What does dojo/hash provide?
A. Interface to advanced data structures
B. A hash table
C. An object to store data
D. Interface to the browser’s URL hash
Ans: D

In this code: require([“dojo/request”], function(request){ request(“example.json”, { handleAs: “json”}).then(function(data){ // Do something }) }); data is
A. Inserted prior to the request.
B. The string “example.json”.
C. The HTTP status code for the request.
D. Undefined.
E. The content of the file example.json.
Ans: E

DojoX is
A. The next generation of Dojo, it is available for testing as a beta distribution.
B. DojoX is an area for development of extensions to the Dojo toolkit.
C. An optimized version of Dojo for production sites which require extremely fast code.
D. Cross-platform support for embedded devices.
E. Deprecated functions which are retained for backwards compatibility.
Ans: B

What is one way to add a click handler to a button?
A. button.on.click = function(e){ // handle event });
B. call(button, “click”, function(e) { // handle event });
C. on(button, “click”, function(e){ // handle event });
D. function on(button, “click”) { // handle event }
Ans: C

The annotation data-dojo-attach-point=’foo’ allows us to do what?
A. Position the DOM node on the page
B. Prevent the DOM node from being changed
C. Allow access to the DOM node by the widget
D. Allow the annotated DOM to be editable
Ans: C

What function handles the call back feature?
A. after()
B. while()
C. where()
D. then()
Ans: D

Which module provides enhancements to native Array functions which may not be available?
A. dojo/_base/array
B. Array
C. Dojo does not provide enhancements for array functions
D. dojo/Array
E. dojo/array
Ans: A

To create a table with an Ajax interface to a server, you can use
A. dojo/Table
B. dijit/form/Grid or dijit/form/Table
C. dojox/dijit/Ajax/Table
D. data/table/Grid or data/table/Ajax/Grid
E. dojox/grid/DataGrid or dgrid
Ans: E

When we create dijits programatically rather than declaratively we must ensure to?
A. Call constructor()
B. Call startup()
C. Call postCreate()
D. Call inherit()
Ans: B

What does registry.byId() return?
A. Reference to the dijit
B. Reference to the element
C. Reference to the tag
D. Reference to the document
Ans: A

How is JSON-P different than JSON?
A. JSON-P works by making a

Posted in Dojo Interview Questions | Tagged , , , , , , , , , | Leave a comment

99 Latest Django Interview Questions and Answers pdf free download

Read the most frequently asked 100 top Django interview questions and answers for freshers and experienced job interview questions pdf

Django Interview Questions and Answers List


Django Interview Questions

Django Interview Questions

What is the command to start Django’s built-in development server?
A. manage.py runserver
B. manage.py –start
C. manage.py run
D. manage.py startserver –dev
E. manage.py –run
Ans: A

Given a model named ‘User’ that contains a DateTime field named ‘last_login’, how do you query for users that have never logged in?
A. User.objects.filter( last_login=Null )
B. User.objects.filter( last_login__null=True )
C. User.objects.filter( last_login__isnull=False )
D. User.objects.filter( last_login__isnull=True )
E. User.objects.filter( last_login=Never )
Ans: D

What does the Django command `manage.py shell` do?
A. Starts a command line in whatever $SHELL your environment uses.
B. Starts a Django command prompt with your Python environment pre-loaded.
C. Starts a Python command prompt with your Django environment pre-loaded.
D. Loads a special Pythonic version of the Bash shell.
E. Loads a Python command prompt you can use to sync your database schema remotely.
Ans: C

Assuming you’ve imported the proper Django model file, how do you add a ‘User’ model to the Django admin?
A. admin.register( Users )
B. admin.site( self, User )
C. user.site.register( Admin )
D. users.site.register( Admin )
E. admin.site.register( User )
Ans: E

What is the Django command to start a new app named ‘users’ in an existing project?
A. manage.py –newapp users
B. manage.py newapp users
C. manage.py –startapp users
D. manage.py startapp users
E. manage.py start users
Ans: D

What does a urls.py file do in Django?
A. This file contains site deployment data such as server names and ports.
B. It contains a site map of Django-approved URLs.
C. It contains URL matching patterns and their corresponding view methods.
D. You run this file when you get obscure 404 Not Found errors in your server logs.
E. This file provides an up to date list of how-to URLs for learning Django more easily.
Ans: C

What is the command to run Django’s development server on port 8080 on IP address
A. manage.py –run 8080
B. manage.py –dev
C. manage.py runserver
D. manage.py run
E. manage.py runserver
Ans: E

Django is written using what programming language?
B. Ruby
C. Javascript
D. Java
E. Python
Ans: E

After you make a new ‘app’ in your existing Django project, how do you get Django to notice it?
A. No additional action is required, Django notices new apps automatically.
B. Run the `manage.py validate` command, and then start a new shell.
C. Run the `manage.py syncdb` command.
D. In settings.py, add the app to the PROJECT_APPS variable.
E. In settings.py, add the new app to the INSTALLED_APPS variable.
Ans: E

What is the purpose of settings.py?
A. To configure settings for the Django project
B. To configure settings for an app
C. To set the date and time on the server
D. To sync the database schema
Ans: A

How do you define a ‘name’ field in a Django model with a maximum length of 255 characters?
A. name = models.CharField(max_len=255)
B. model.CharField(max_length=255)
C. name = models.CharField(max_length=255)
D. model = CharField(max_length=255)
E. name = model.StringField(max_length=auto)
Ans: C

What is the definition of a good Django app?
A. A good Django app provides a small, specific piece of functionality that can be used in any number of Django projects.
B. A good Django app is a fully functioning website that has 100% test coverage.
C. A good Django app is highly customized and cannot be used in multiple projects.
Ans: A

What is the most easiest, fastest, and most stable deployment choice in most cases with Django?
A. FastCGI
B. mod_wsgi
Ans: B

How do you exclude a specific field from a ModelForm?
A. Create a new Form, don’t use a ModelForm
B. Use the exclude parameter in the Meta class in your form
C. Set the field to hidden
D. You can not do this
Ans: B

Assuming you have a Django model named ‘User’, how do you define a foreign key field for this model in another model?
A. model = new ForeignKey(User)
B. user = models.IntegerKey(User)
C. user = models.ForeignKey(User)
D. models.ForeignKey( self, User )
Ans: C

What preferred method do you add to a Django model to get a better string representation of the model in the Django admin?
A. __unicode__
B. to_s( self )
C. __translate__
D. __utf_8__
Ans: A

What is ModelForm used for?
A. To model an input form for a template
B. To specify rules for correct form when writing Django code
C. To define a form based on an existing model
Ans: C

What happens if MyObject.objects.get() is called with parameters that do not match an existing item in the database?
A. The Http404 exception is raised.
B. The DatabaseError exception is raised.
C. The MyObject.DoesNotExist exception is raised.
D. The object is created and returned.
Ans: C

A set of helpful applications to use within your Django projects is included in the official distribution. This module is called what?
A. django.extras
B. django.helpers
C. django.utilities
D. django.ponies
E. django.contrib
Ans: E

What is the correct syntax for including a class based view in a URLconf?
A. (r’^pattern/$’, YourView.as_view()),
B. (r’^pattern/$’, YourView.init()),
C. (r’^pattern/$’, YourView),
D. (r’^pattern/$’, YourView()),
Ans: A

What is the command to start a new Django project called ‘myproject’?
A. django-admin.py startproject myproject
B. django-admin.py –start myproject
C. django.py startproject myproject
D. django.py –new myproject
E. django.py new myproject
Ans: A

How to make django timezone-aware?
A. In settings.py: USE_L10N=True
B. in views.py, import timezone
C. in views.py, import tz
D. in urls.py, import timezone
E. In settings.py: USE_TZ=True
Ans: E

In Django how would you retrieve all the ‘User’ records from a given database?
A. User.objects.all()
B. Users.objects.all()
C. User.all_records()
D. User.object.all()
E. User.objects
Ans: A

How can you define additional behavior and characteristics of a Django class?
A. def setUp():
B. class Meta:
C. class __init__:
D. def Meta():
E. def __init__():
Ans: B

What is the Django shortcut method to more easily render an html response?
A. render_to_html
B. render_to_response
C. response_render
D. render
Ans: B

What does the Django command `manage.py validate` do?
A. Checks for errors in your views.
B. Checks for errors in your templates.
C. Checks for errors in your controllers.
D. Checks for errors in your models.
E. Checks for errors in your settings.py file.
Ans: D

What is the correct way to include django’s admin urls? from django.contrib import admin’) from django.conf.urls import patterns, include, url urlpatterns = patterns(”, ______________________ )
A. url(r’^admin/’, admin.as_view(), name=’admin ),
B. url(r’^admin/’, include(admin) ),
C. url(r’^admin/’, include(admin.site.urls) ),
D. url(r’^admin/’, admin.urls ),
E. admin.autodiscover()
Ans: C

Where is pre_save signal in Django
A. from django.db.models import pre_save
B. from django.db.models.signals import pre_save
C. There is no pre_save signal
D. from django.db.models.signal import pre_save
Ans: B

Given the Python data: mydata = [ [ 0, ‘Fred’ ], [ 1, ‘Wilma’ ] ] How do you access the data in a Django template?
A. {% for d in mydata %}

{% d.1 %}

{% endfor %}
B. {% for d in mydata -%}

{{ d.1 }}

{% end -%}
C. {% for d in mydata %}

{{ d.1 }}

{% endfor %}
D. {{ for d in mydata }}

{{ d[1] }}

{{ endfor }}
E. {% mydata.each |d| %}

{{ d.2 }}

{% end %}
Ans: C

What is the purpose of the STATIC_ROOT setting?
A. Defines the URL prefix where static files will be served from .
B. Defines the location where all static files will be copied by the ‘collectstatic’ management command, to be served by the production webserver.
C. A project’s static assets should be stored here to be served by the development server.
D. Defines the location for serving user uploaded files.
Ans: B

How to create a DateTimeField named created and filled in only on the creation with the current time?
A. created = models.CreationTimeField()
B. created = models.DateTimeField(default=datetime.datetime.now())
C. created = models.DateTimeField(auto_now_add=True, auto_now=True)
D. created = models.DateTimeField(auto_now=True)
E. created = models.DateTimeField(auto_now_add=True)
Ans: E

Given an IntegerField named ‘widgets’ in the Django model ‘User’ , how do you calculate the average number of widgets per user?
A. User.objects.avg( ‘widgets’ )
B. Widget.objects.all().aggregate( Avg( ‘users’ ) )
C. User.all().aggregate( Avg( ‘widgets’ ) ).count()
D. User.objects.all().aggregate( Avg( ‘widgets’ ) )
E. User.objects.all().aggregate( Sum( ‘widgets’ ) )
Ans: D

What is the Django command to view a database schema of an existing (or legacy) database?
A. manage.py legacydb
B. django-admin.py schemadump
C. manage.py inspect
D. manage.py inspectdb
E. django-admin.py inspect
Ans: D

What is the Django command to retrieve the first 10 ‘User’ records from your database sorted by name descending?
A. User.all().order_by(‘-name’)[10:]
B. User.objects.all().order(‘-name’)[:10]
C. User.objects.all().order_by(‘-name’)[:10]
D. User.objects.all().order_by(‘name’)[:10]
E. User.objects.all().order(‘-name’)[10:]
Ans: C

What is the definition of a Django Project?
A. A specific piece of functionality that can be used in multiple Django apps.
B. A fork of the official Django repo.
C. A web site that uses the Django framework.
D. A collection of configuration files and individual apps that form a web site.
Ans: D

Given a model named ‘User’ that contains a field named ’email’, how do you perform a case-insensitive exact match for the email ‘fred@aol.com’?
A. User.objects.filter( email__icontains=’fred@aol.com’ )
B. User.objects.filter( email__iexact=’fred@aol.com’ )
C. User.objects.filter( email__contains=’fred@aol.com’ )
D. User.objects.filter( email__exact=’fred@aol.com’ )
E. User.objects.filter( email__matches=’fred@aol.com’ )
Ans: B

Given a form with field foo, what should the validation method for this field be called?
A. foo_clean
B. foo_is_valid
C. clean_foo
D. validate_foo
Ans: C

You have created a Form class and wish to provide custom logic for validating the input in the “foo” field. What would you name your custom validation method?
A. clean_foo
B. foo_clean
C. clean_foo_field
D. sanitize_foo
E. validate_foo
Ans: A

When customizing validation in a Form subclass named MyForm, how do you add an error message that is displayed as a form-wide error?
A. Add the error to MyForm.errors in MyForm.clean()
B. Raise ValidationError in MyForm.clean_()
C. Raise ValidationError in MyForm.clean()
D. Add the error to MyForm._errors in MyForm.clean()
Ans: C

Which class is a model field representing a path to a server-based image file?
A. django.db.models.fields.files.ImageFieldFile
B. django.db.models.fields.files.ImageFile
C. django.db.models.fields.files.ImageField
D. django.db.models.fields.files.ImageFileField
E. django.db.models.fields.files.ImageFileDescriptor
Ans: C

In settings.py, when DEBUG is set to ________, Django will email unhandled exceptional conditions.
A. False
B. 1
C. Always
D. True
E. Never
Ans: A

What is the command used to print the CREATE TABLE SQL statements for the given app name?
A. ./manage.py sql myapp
B. ./manage.py schema myapp
C. ./manage.py showsql myapp
D. django-admin.py dumpdata myapp
E. ./manage.py showschema myapp
Ans: A

How do you create a recursive relationship in a model class named ‘Company’ in Django?
A. models.ForeignKey(Company)
B. models.ForeignKey(‘self’)
C. models.ForeignKey(‘me’)
D. models.ForeignKey(‘Company’)
Ans: B

You have a Form defined with “password” and “confirm_password” fields. In what method of the “form” object would you validate that the values supplied in these fields match?
A. form.clean_confirm_password
B. form.clean
C. form.validate
D. form.sanitize_data
E. form.clean_password
Ans: B

What command do you use to alter the fields Django displays for a given model in the Django admin ListView?
A. auto_list_fields
B. list_filter
C. list_display
D. fields_display
E. fields_list
Ans: C

You can handle multiple Django forms with what keyword argument when creating forms?
A. suffix
B. prefix
C. name
D. infix
Ans: B

Which of these can be used to retrieve a setting from the settings module, and provide a default if the setting is not defined?
A. get_setting(“SETTING_NAME”, default=default_value)
B. getattr(“SETTING_NAME”, settings, default=default_value)
C. settings.get(“SETTING_NAME”, default_value)
D. getattr(settings, “SETTING_NAME”, default_value)
Ans: D

The Benevolent Dictators for Life of the Django Project are:
A. Ian Bicking and Jannis Leidel
B. Jacob Kaplan-Moss and Adrian Holovaty
C. and Armando De La Veloper
D. Guido van Rossum and Linus Torvalds
E. Eric S. Raymond and Larry Wall
Ans: B

The django.contrib.contenttypes application provides
A. functionality for working with varied file formats
B. mimetypes used for returning http responses
C. a generic interface for working with models
D. none of the others
Ans: C

In your django template, if you need to get the content of the block from the django parent template, what do you need to add? {% block my_block %} ___________ {% endblock %}
A. {% super %}
B. {{ extends block }}
C. super (block, self)__init__()
D. {{ block.super }}
E. {% block.super %}
Ans: D

Which type of custom template tag returns a string?
A. inclusion_tag
B. assignment_tag
C. string_tag
D. simple_tag
Ans: D

What command compile Django’s translation files?
A. ./manage.py translate_files
B. ./manage.py compilei18n
C. ./manage.py compilemessages
D. ./manage.py i18n_update
E. ./manage.py compiletranslation
Ans: C

A model’s “full_clean()” method is called automatically when you call your model’s “save()” method.
A. True
B. False
Ans: B

How would you perform a lookup on a model against a database aside from the default?
A. Model.objects.using(‘other’).all()
B. Model.objects.database(‘other’).all()
C. Model.objects.all(using=’other’)
D. Model.objects.all(database=’other’)
Ans: A

Given a model named ‘User’ that contains a CharField ‘name’, how do you query for users whose name starts with ‘Fred’ or ‘Bob’?
A. User.objects.filter( name__regex=r’^(fred|bob)+’ )
B. User.objects.filter( name_iregex=r’^(fred|bob)+’ )
C. User.objects.filter( name__like=r’^(fred|bob)*’ )
D. User.objects.filter( name__iregex=r’^(fred|bob).+’ )
E. User.objects.filter( name__iregex=r’^(fred|bob)$’ )
Ans: D

Which model field type does NOT exist in Django?
A. CommaSeparatedIntegerField
B. LargeIntegerField
C. IPAddressField
D. SlugField
E. SmallIntegerField
Ans: B

What datetime formatting would you apply in a template to display the following: 2013/03/20 8:00:06 AM ?
A. Y/m/d H:i
B. m/d/Y h:m:s
C. Y/m/d g:i:s A
D. Y-m-d H:m:s
E. Y/m/d H:i:s A
Ans: C

How would you create a ForeignKey from a model named Transaction, to a model named Product, with no reverse relation?
A. class Transaction(models.Model): product = models.ForeignKey(Product, related_name=None)
B. class Transaction(models.Model): product = models.ForeignKey(Product, related_name=’+’)
C. class Transaction(models.Model): product = models.ForeignKey(Product, related_name=False)
D. class Transaction(models.Model): product = models.ForeignKey(Product, related_name=”)
Ans: B

How to set a default order by in your Django model ? YourModel.objects.all() will be ordered by default without calling order_by() method
A. Using META default_order attribute
B. Using META order attribute
C. Using META order_by attribute
D. Using META ordering attribute
E. Using META default_order_by attribute
Ans: D

What is the name of the Django decorator that hides sensitive info from error reports?
A. @secret_variables
B. @sensitive_variables
C. @hide_fields
D. @secret_fields
E. @sensitive_fields
Ans: B

By using django.contrib.humanize, you can use the following filter in your template to display the number 3 as three.
A. apnumber
B. intcomma
C. intword
D. ordinal
E. naturaltime
Ans: A

Posted in Django Interview Questions | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

50 TOP Database Administrator Interview Questions and Answers pdf download

Read the most frequently asked 50 top Database Administrator interview questions and answers for freshers and experienced job interview questions pdf

Database Administrator Interview Questions and Answers List

1. What is a Database?
A Database Administrator needs to know what a database is before they can administer it, right? At its most basic, a database is a collection of tables, structured in such a way that it can be navigated like you would any sort of table. If you remember in math class, you may have had a number of tables that allowed you to quickly find a value if you multiplied an x and y value together — or in this case, what it would be if you were looking for a particular row and column value.

2. Why should I go to all the trouble of creating a database when I have a perfectly good Excel Spreadsheet?
Scale. If you were to take a (singular) spreadsheet and a (singular) table and place them side by side, there would be effectively no difference in the data you are seeing or what you could do with it. As you go bigger and bigger with more and more tables and spreadsheets, if you have a black belt in spreadsheet-fu you can accomplish many of the same tasks that a database could do as well. The problem is, as you go larger and larger and larger, that it becomes much more difficult to be human-friendly and still be efficient when it comes to processing data. So should you replace every single spreadsheet with a database? Not necessarily, but if the data on that spreadsheet needs to be accessed quickly by multiple users simultaneously and is growing rapidly, it may be time to consider going to the dark side (they have cookies).

3. What is a query?
A query in normal terms is a question, simple enough. It is the statement that is talking to the database in order to Create, Read, Update or Delete (CRUD) data. While many times a query is an actual question asking for an answer, it can also be the statement to modify, insert, or remove data in the database as well.

4. What is SQL?
Structured Query Language is the basic way of asking a database server to talk to you. Whether that is in the context of asking it a question, giving it answers to questions it is asking you, or updating answers that have already been stored in the database. The art of asking the right question is critical to getting back the right data you need, which is incredibly valuable when dealing with databases, as it is very easy to receive far more data than you know what to do with, or nothing at all.

5. What does ‘SELECT’ do?
SELECT in the terms of an SQL query triggers a question to the database. It looks across the specified table(s), finds the data you are looking for and then presents it to the user for consideration. Depending on the query, this can be an awful lot of data, so again, asking the right question is critical.

6. What is a primary key?
A primary key is usually used as the index for a particular table — a value that the table can depend upon to be a reliable unique value in every row. When trying to pull data for a particular row, the primary key will normally be used to pull that information, usually a numeric value. For example, if you are trying to pull up data on a specific person, and that database is using their unencrypted ssn as the primary key (naughty), then that could be used in the query to identify that particular row since there could be other people present in the database with that specific name or other identifying characteristics.

7. What is a Database Management System?
A Database Management System, or DBMS, is essentially the application that handles the heavy lifting between you (the user), and the raw data. The database itself is just that — the database; it cannot alter its own data any more than the average person can re-arrange their genetic code. The DBMS is what you are talking to when you are asking the questions. It is what looks at your question, thinks about it for a while, goes to the database, picks up the data, hands it back to you, and asks you to come again.

8. What is the difference between a Navigational database and a Relational database?
The best way to describe a Navigational DBMS is through that of a tree. Each value was associated with another through the use of a parent, most of the time with no other direct way to access the data. Relational Databases on the other hand use values common to multiple tables to establish a unique key — making sure that they are talking on the same page so that there are many, many ways to get to the same place. To put it another way, if you were trying to get from point A to point B, a navigational database would have one specific path to get there — via a freeway. A relational database on the other hand would have options for taking the freeway, a back road, a boat, a plane, a bus and sometimes a rocket — provided that each of those methods were set up correctly to talk to each other. Most modern databases use the relational database model.

9. Why do most database types not talk to each other?
In a word: money. In three words: a lotttta money. Different database vendors spend a huge amount of research time trying to find ways to give them a leg up on the competition; whether that may be by performance, storage capacity, longevity, reliability, scalability, the list goes on and on. As a result, trying to be compatible and backwards engineer every single feature of a particular database type is difficult in the extreme before you even get to the patent violations. Most databases can be simplified down to filetypes like .csv files, which can be used to transport basic data from vendor to vendor. That being said however, there would be a lot lost in translation without help from higher up.

10. What is a Frontend?
For those that don’t want to see row upon row upon row of data in front of them until they go cross-eyed, a frontend is essential. In essence a management program, a frontend allows admins to be able to view and modify high level database functions without the need to use the command line for every single thing. This can be extremely useful not only for efficiency, but also for safety, as it can prevent accidental data modification. It can also allow users that are more used to a GUI application most of the utility that the CLI permits.

11. What is a ‘join’?
Well when two tables love each other very much…not that much happens actually. However when you need to search across multiple tables simultaneously, a join can help make that happen. For example, if you were searching for information on a particular product and one table has the description while the other has pricing information, you can use a join to search across both tables simultaneously using a single query.

12. What is a foreign key?
When using a join or other type of query that goes across multiple tables, it can sometimes be difficult to make sure they are talking on the same page. A primary key can help with this, but sometimes this is impractical, and thus you need a secondary value that is consistent across multiple tables. For example, say that in a series of tables for product listings you have your primary key assigned to an auto-increment ID based on when the product was entered (a typical setup), and then none of these rows are able to line up with their counterparts in other tables. So if you have one table for product listings, another for price information, another for reviews, etc. — this could be a fairly major problem. However, if you know for a certainty that your part numbers for these products are going to be unique values, you can use that as a foreign key and suddenly everything lines up all nice and neat. This is possible since it exists in more than one table, and since is being referenced from outside its own table; it is designated ‘foreign’. This does not mean it still could not be the primary key for that particular table as well, it just means it has a reference that can be looked to from another point of view.

13. What is SQL Injection?
Also known as asking a question and getting the answer you want, rather than the answer they want to give you (anybody that has tried to navigate certain nameless support phones knows that this isn’t necessarily a bad thing); however in the context of a database application, this can be “a very bad thing”™. For instance, say that you are on an online banking website. You’re at the login screen, and it is waiting for you to enter your login and password so it can display your particular financial information. But what if you want to see the listing of everybody else that banks at this particular location? Depending on how the bank’s site is hardened against such an attack, you could get their personal information, current balances, PIN numbers, or even worse, enter your own data directly into the database — able to create new accounts, set up transaction history, active balances, the list goes on and on.

14. What is input sterilization?
One of the main answers to SQL Injection, input sterilization allows the database to selectively ignore data coming in from an input field and strip out non-required data. For example, if a field is expecting only a numeric value, there is no need for letters or symbols to be present in the user input. Therefore, these values can be safely ignored but still keep the functionality of the form intact. While not an end-all beat-all, it goes a long way to helping mitigate attacks on this vector.

NoSQL (Also called Not Only SQL), is a different form of database than the standard relational type. While it can use a lot of the same kinds of query language, it doesn’t necessarily use the same type of table structure that standard relational databases use, and thus in some cases can be more efficient. That efficiency depends greatly on its application however, and many times you will see NoSQL used in Big Data crunching and analysis applications that require real-time feedback.

What is ‘Big Data’?
DATA. If you’ve ever shopped on Amazon or at a Walmart, searched on Google or been on Facebook for more than 10 minutes, then you’ve seen Big Data in action. Big Data is essentially looking at the forest for the forest instead of the trees. An individual person is a unique entity with a specific set of actions and reasons for why they do what they do. Tracking an individual person’s actions can sometimes be useful, however it’s also a shot in the dark. But multiply that by many, many millions and suddenly the individual actions don’t matter as much — yet patterns start to emerge. A good example of this was published in the New York Times: Walmart discovered that just prior to a major storm, there was a run on the usual items such as bottled water, batteries and flashlights — but also strawberry pop tarts. This pattern was consistent across the board, so they were able to bundle these items together in certain parts of the store and increase profits. Amazon Suggestions, Google Analytics and other entities that run off of Big Data are huge moneymakers for their respective entities for being able to consistently give (relatively) accurate recommendations to users based on their past interests or purchases.

What is a ‘Flat File’?
A flatfile is a catch-all term used for concepts like Comma Separated Values (.csv). While there are a lot of different ways to create such a file, they all share ideas that they can be created and manipulated easily and without necessarily requiring a standard database application. These can also be used to transfer data from system to system due to their lightweight status. In some cases, these have been replaced by XML files, however XML can when compared to certain kinds of flatfiles, be very large.
I have a database that was built in MySQL, and I need the data to be moved over to Microsoft SQL Server. How would I do this?
The easy answer would be to contact Microsoft Tech Support and bring your checkbook. A more difficult answer would be to bring it down to a .csv file and then import it into SQL Server, but without a specialty conversion utility you may lose some program-specific specific tricks, thus requiring some rebuilding once the conversion is complete. This is not saying that this would work in all cases, but it is at least an option.

What is the difference between ‘=’ and ‘LIKE’?
When crafting a query, or using programming to display data in certain ways depending on the values being returned, you may want to think that these can be used interchangeably. There is one big difference, however: equal means equal. The value being returned must match the value it is being compared to 100%. LIKE, however, can be used with a number of different wildcard mechanics, allowing you to be a bit more flexible in your rules.

What is a Null Value?
A Null Value is an absence of data. This one is a bit misleading sometimes, because depending on who you ask, it can be considered many possible things. “Null equals 0”- Not in this context, because 0 is a value. “Null equals Empty” — closer, but again sometimes an empty value can still be considered a value depending on how the field is structured. If a column allows for null values, and no value is submitted, then it allows it to be Null.

What does ‘INSERT’ do?
INSERT submits data into a database as a new row, usually through the use of a form. While forms can take many…forms…, the most common uses are through either a dedicated application or through the use of an HTML form. Clicking on the ‘submit’ button will trigger the built in form reaction to scan the form for particular fields, making sure the required ones are entered correctly, make sure the user isn’t being naughty in what they are trying to enter, then submit the data to the database.

What does ‘DROP’ do?
DROP removes a table from a database or a database from a server. A very dangerous command indeed, it is only to be used in situations that absolutely require it, as unless you have a backup of it handy, there is no coming back from this.

What is the difference between T-SQL and PL/SQL?
T-SQL or Transact-SQL is Microsoft’s version of SQL. The main additions Microsoft made to the main branch of SQL involve the addition of procedures or routines — scripts essentially — that can be run under certain criteria. PL/SQL, on the other hand, is Oracle’s version of SQL, and conceptually the two are very similar. However, because of the nature in how they were developed, trying to move data from one to the other involves quite a bit of work. The main differences deal with how they multi-task and how they lock elements when they are in use.

What does ‘UPDATE’ do?
UPDATE allows values to be modified where they meet specific criteria. For example, say that you were on Amazon and were about to move. As a result, you would want to adjust your mailing address so that you actually got your stuff. You would therefore go into your settings and it would show you your current address. Modifying this address and then submitting the form would update your address based on your particular user profile. If it updated anybody else’s address to match that would be a serious problem — at least for the person doing the paying.

Why do database servers benefit from a lot of memory, and why do 64-bit operating systems help in this regard?
Database servers like to cache as much data as possible when they are reading it a lot. Storing this information in active memory is a lot faster than trying to find it again from the hard disk or other media. Therefore more memory = faster response time = better performance. The problem is that for most operating systems the maximum amount of memory that can be used by a 32-bit OS is 4 gigabytes. While in years past this would have been an inconceivable number, today it is a drop in the bucket. 64-bit operating systems resolve this issue by being able to handle memory to 192 gigabytes currently for Windows, while Linux can theoretically go much higher at present, and these numbers will only climb higher and higher.

Why is it a bad idea to run a test on a live database?
On a test database, it’s relatively easy to keep the performance variables to a minimum. On a live database however, it needs to be functioning for all users all the time. Running untested code on a production database can not only reduce performance, but also create unforeseen instability in the server itself — potentially causing crashes and data corruption.

Why is it difficult to use standard file by file backup methods on an active database server?
This problem is twofold. First, many database servers place locks on database files that are currently in use. Most backup programs that try to do a file-by-file backup will therefore be unable to create a copy of this file, as they cannot get exclusive permissions to it. Second, while some database servers have only a single file to backup a database, others have multiple files that can be stored in different locations across possibly multiple physical hard disks. The problem can be resolved in one of two potential ways. First, using the backup method within the database server itself. Some programs such as Microsoft SQL Server allow you to create a scheduled backup directly within the server application to a location of your choosing. Others require you to use a scheduled task or another on-demand type of backup solution. The second would be to use a backup application that can talk directly to the database server, allowing the database to be backed up using a different technique.

When would you use an offline backup method versus an online backup?
If the above methods are unavailable when trying to create a backup solution, another potential method is temporarily taking down the database or database server in order to create a file-by-file backup. The problem with this method is that if the server goes down incorrectly, the backups could be flagged as bad and thus unusable. Periodically testing your backups to make sure they are working properly is strongly recommended, regardless of what method you use to create them.

What is Replication?
Database replication allows for real-time automated backups between multiple database servers. This allows for the creation of either a fall-over server, or warm backup for use in case the main server goes down.

Is data in databases encrypted by default?
While most database servers support some form of encryption out of the box, it is not enabled by default due to performance hits and security concerns.

What is the difference between a ‘TINYINT’, an ‘INT’ and a ‘BIGINT’?
Contrary to popular belief, this is not the lifecycle of a talking tree. Rather, it is the creation of a column that allows for specific levels of integers (numeric whole numbers) up to a specified cap. There are many ways to limit the growth of fields, but in the case of Microsoft SQL Server, these each represent a value in bytes, which creates a maximum value that the field can hold.

Data type Range Storage
bigint -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807) 8 Bytes
int -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647) 4 Bytes
tinyint 0 to 255 1 Byte

How would you store files within a database?
Two common ways to store files for use by a database are either within the operating system’s file system, or within a field of the table itself. Uploading and storing the files outside of the database makes for faster creation of the application, and can be more efficient if the file sizes are larger, but can potentially cause security issues if the files are not secured correctly. On the other hand, the files can also be stored directly within the database using a BLOB-type field. A BLOB is a Binary Large Object, essentially an empty area where a file can be uploaded to but not exceed a specified limit. Like int in the example above, blob has a number of different potential sizes, depending on the type used. Bear in mind there are other methods for storing and accessing files in a database server, these two are merely the most common.

When would you use ‘char’ versus ‘varchar’?
This is a bit of a difficult question, mostly because it depends so much on what your application is. For example, if you have a form field that can be nearly any length and changes every single time, then varchar is a much more practical choice, since it gives you much more flexibility. If however you have a field where every value is going to be exactly the same length, then you can get more efficient performance out of a char. Again, it depends on exactly what your application is, and how you plan to cook it — seasoning as you see fit.

What is XML?
Extensible Markup Language (XML) is a fast way to display data that not only conforms to a structure that can be read by machines, but is also easily understandable by humans. Because they can be dynamically and manually generated in many different ways, they are easy to produce and map to; and because they retain the same structure despite the data being updated, they can be relied upon for automatic functions such as RSS aggregation.

What shows that a database server is running?
Database servers run as services or daemons, most times in the background without the necessity to see that they are running in order to interact with them. When things go sideways however, being able to verify that the service is in fact up and running can be an excellent place to start troubleshooting. Checking under the services area of your particular operating system, whether that be by GUI or by CLI, can show you that the service is started or not, thus allowing you either to start or restart it as need be.

What is WYSIWYG?
What You See Is What You Get. A mouthful of an acronym, it allows for the creation of an application that is consistent regardless of how it is viewed — whether on the design screen, being viewed in a browser or being printed. Creating an interface to a database that is not only functional but also looks nice is a trick in itself, and can take a lot of work to get it just right.

Why is it frowned upon to use ‘SELECT * ..’ in a large database?
Picture it like a group of people in line for a bathroom, and every single person that was going in there was going to use the toilet, change their clothes, take a shower, iron their jacket, take another shower, etc. There is only so much area that can be used efficiently before you start to get a queue, slowing down the whole operation that can eventually cause the entire thing to collapse under lack of toilet paper. You can quickly get back more than you can use or understand, so optimization is key when creating queries and asking only what you need to get the question answered.

How would you get the quantity of results from a query?
COUNT() is the main supported way to be able to get the number of returned results from a query. While there are many other options such as mysql_num_rows, these are considered obsolete and are being removed.

What is a Database Schema?
If you’ve ever seen one of those Visio diagrams with 40 different tables with lines connecting particular columns on one with those on another, that’s a database schema. Essentially a two-dimensional representation of how each table talks to other ones, it is the way to view the design of a database as a single entity and not as a jumble of different tables.

What are Nested Queries?
A query within a query, this particular method can be tremendously difficult to troubleshoot and even harder to manage without a lot of overhead. In most cases, a nested query can be replaced with a JOIN, allowing for much more efficient use of resources.

What is ODBC?
Open Database Connectivity is a way to make different kinds of frontends talk to different data sources (DSNs) such as Databases. The specifics available depend on the type of application being used, the driver being used and the backend to which it is being applied.

For Oracle systems, what is OFA?
Optimal Flexible Architecture (OFA) is the recommended layout for installing and configuring an Oracle database.

For Oracle systems, what is error “ORA-01034”?
The full error is “ORA-01034: ORACLE not available”. While there are many potential causes, the most common is that the service is just not running. The resolution is to start the service, then see if the error comes back.

What is Normalization?
When most people first start working with databases, the first instinct is to create massive tables for storing data — one place, one query — keeps things simple. However, as they grow to unmanageable levels, it is a good idea to look into Database Normalization. This idea allows for data to be split off into smaller more efficient tables that (hopefully) reduce the amount of duplicate data. In this way, smaller queries can be run on individual tables instead of having everybody always talking to one big one — thus improving performance.

For Microsoft SQL Server, what is a DMV?
Dynamic Management Views are functions built into Microsoft SQL Server that allow for troubleshooting, diagnostics and server health monitoring.

What are the default ports for MySQL, SQL Server and Oracle, and can/should this be changed?
The default port for MySQL is 3306, and can be changed in Windows as noted in this article or in *nix as noted in this article. The default port for Microsoft SQL Server is 1433, and can be changed as noted in this article. The default port for Oracle is 1521, and can be changed as noted in this article. Depending on your security stance, changing the port that your database server uses can be a good way to lower your profile and reduce the amount of unauthorized access attempts against the server.

For Microsoft SQL Server, What is Log Shipping?
A form of backup on Microsoft SQL Server, Log Shipping is similar to replication and allows for rapid failover if the main server goes down. One thing to bear in mind, however, is that a log shipping based failover must be activated manually; it will not switch over automatically.

For Microsoft SQL Server, what is DBCC?
Database Console Commands (DBCC) are a series of utilities for SQL Server designed for maintenance and reporting. A full list of the commands can be found here.

What is Cloud Computing?
Cloud Computing is usually a catch all term for data being stored “over there”. Placing high-requirement applications onto dedicated hosting services can be beneficial depending on the application, however it can also cause catastrophic security problems and availability issues. It is therefore highly recommended to keep important data in-house, and only outsource in situations that it cannot be avoided. Cloud Computing, Big Data and Data Mining are many times talked about in the same sentence since processing power required for one usually means the others become viable either as a requirement or a side effect.

What is Hadoop?
Hadoop is a Data Mining application designed to handle very, very large amounts of data across a wide variety of environments — from one to thousands of systems. Used in situations that don’t necessarily fit into standard database structures, its main strength is being able to take one giant project and split it off to each of its member servers, have them each process their own job, then have their findings recombined into one viewable result.

Posted in Database Administrator Interview Questions | Tagged , , , , , , , | Leave a comment

75 TOP Real Time CakePHP multiple choice questions and answers PDF

Read the most frequently asked 75 top CakePHP multiple choice questions and answers PDF for freshers and experienced

CakePHP Objective type Questions and Answers List

1. Which CakePHP entities can the Bake console create?
A. Controller
B. All of these
C. Model
D. View
Ans: B

2. How does one add scaffolding to an application?
A. class CategoriesController extends AppController { public $scaffold; }
B. None of these
C. class CategoriesController expands AppController { public $scaffoldx12 }
D. class CategoriesController extends AppController { public $scaffolding$ }
Ans: A

3. Which by is not a core find type provided by CakePHP?
A. first
B. all
C. active
D. threaded
E. neighbors
Ans: C

4. Is it possible to define custom data retrieval methods and if so, where would you define them?
A. Yes, create a component
B. Yes, as a controller function
C. Yes, in the routes
D. Yes, in the model
E. No, good luck
Ans: D

5. What CakePHP component is not part of the View layer?
A. Element
B. Helper
C. Layout
D. ViewClass
E. Behavior
Ans: E

6. In which controller callback would you preferably set “Auth->loginAction”?
A. loginFilter()
B. afterFilter()
C. _beforeScaffold($method)
D. beforeRender()
E. beforeFilter()
Ans: E

7. Which function is executed before every action in the controller.
A. beforeFilter
B. All of above
C. afterFilter
D. firstFilter
Ans: A

8. In cakePHP 2.x , the recursive property defines:
A. how deep CakePHP should go to fetch associated model data via find(), and read() methods
B. how many records to fetch by data via find(), and read() methods
C. how many time the find(), and read() methods are called
Ans: A

9. How will you include an element (header/footer etc.) within a layout?
A. element(‘element_name’); ?>
B. set(‘element_name’); ?>
C. include(‘element_name’); ?>
Ans: A

10. Which of the following is an example of a model definition in CakePHP?
A. App::uses(‘AppModel’, ‘Model’); class Ingredient extends AppModel { public $name = ‘Ingredient’; }
B. CakePlugin::loadAll(); // Loads all plugins at once CakePlugin::load(‘ContactManager’); //Loads a single plugin
C. class IngredientsController extends AppController { public function index() {
D. None of these
Ans: A

11. What is the name of Cake’s database configuration file?
A. database.php.default
B. database.php
C. databaseconfig.php
D. default.database.php
E. config.php
Ans: B

12. True or False? Scaffolding in CakePHP also allows developers to define how objects are related to each other, and to create and break those links.
A. False
B. True
Ans: B

13. True or False? CakePHP will dynamically create a model object for you if it cannot find a corresponding file in /app/Model.
A. True
B. False
Ans: A

14. Which of the following function will be called before any action get executed ?
A. render
B. index
C. beforeFilter
D. beforeRender
E. afterFilter
Ans: C

15. Which file is processed first?
A. bootstrap.php
B. index.php
Ans: B

16. The association types in CakePHP are:
A. hasOne, hasMany, belongsTo, and hasAndBelongsToMany
B. oneToOne, oneToMany, manyToOne, manyToMany
C. hasAll, hasMany, belongsTo, manyToMany
D. hasAll, hasMany, belongsTo
Ans: A

17. What should be done before deploying a CakePHP application?
A. Disable debug messages in core.php
B. Disable exception stack traces
C. Set document root to app/webroot
D. All of them
E. Make sure data is sanitized and validated
Ans: D

18. CSRF protection is provided in CakePHP 2.x in
A. None of above
B. SecurityMethods
C. SecurityComponent
D. SecurityPlugin
Ans: C

19. Which data retrieval function will return one result only?
A. find(‘list’, $options)
B. find(‘first’, $options)
C. find(‘threaded’, $options)
D. find(‘one’, $options)
E. find(‘all’, $options)
Ans: B

20. What is the AppController class?
A. It is responsible for converting the POST parameters into a request object.
B. None of these.
C. It sets the initial configuration for plugins and caching.
D. It builds and manages paths to various components of the application.
E. It is the parent class to all of the application’s controllers.
Ans: E

21. By default, what controller action will be invoked if the action is not specified in the URL?
A. add
B. view
C. index
D. default
Ans: C

22. What is the default action for a controller?
A. index() function
B. None of these
C. _index() function
D. main() function
E. control() function
Ans: A

23. What is a .ctp file?
A. Common Timing Protocol
B. misnamed
C. Twig Template
D. CakePHP Template
E. PHP Container File
Ans: D

24. How is the AppController class defined?
A. $data = array( ‘color’ => ‘pink’, ‘type’ => ‘sugar’
B. class AppController extends Controller { }
C. public function beforeFilter() { parent::beforeFilter(); }
D. None of these
Ans: B

25. True or False? CakePHP favors convention over configuration.
A. True
B. False
Ans: A

26. The Bake console can be used to create:
A. none of above
B. models and views only
C. models only
D. models, views and controllers
E. models and controllers only
Ans: D

27. Which of email transports can be used in CakeEmail?
A. Only Mail and Smtp
B. Mail, Smtp and your own
C. Only Mail
D. Only Smtp
Ans: B

28. According to the CakePHP naming conventions, which of the following is a correct name for a controller file?
A. QuestionController
B. questionController
C. questionsController
D. QuestionsController
Ans: D

29. How does one create a virtual field?
A. public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds);
B. public $virtualFields = array( ‘name’ => ‘CONCAT(User.first_name, ” “, User.last_name)’ );
C. None of these
D. class Category extends AppModel { public $actsAs = array(‘Tree’); }
Ans: B

30. What does MVC stand for?
A. Maximum-velocity-counter
B. Model-view-controller
C. Modular-view-controlling
D. Module-vector-core
Ans: B

31. True or False? CakePHP is based on the MVC design pattern.
A. False
B. True
Ans: B

32. Which is the default controller provided to serve static content?
A. StaticController
B. PagesController
C. HtmlController
D. ContentController
Ans: B

33. Which is not a core Component in CakePHP?
A. DebugKit
B. Security
C. RequestHandler
D. Paginator
Ans: A

34. echo ”

; print_r($array); echo

; what we write for these three lines in CakePhp.
A. print_preArray($array);
B. print_array();
C. debug_array($array);
D. print_pre_array($array);
E. debug($array);
Ans: E

35. You want to generate three instances of a model form within the context of a view. What syntax is most correct to use with FormHelper::input() ? $i represents an incremented variable.
A. $this->Form->input(“fieldname.$i.Modelname”);
B. $this->Form->input(“Modelname.$i.fieldname”);
C. $this->Form->input(“$i.Modelname.$i.fieldname”);
D. $this->Form->input(“$i.fieldname”);
Ans: B

36. True or False? Your own validation methods must have public visibility.
A. True
B. False
Ans: A

37. What kind of functionality does the Security Component provide?
A. Form tampering protection
B. CSRF protection
C. All of these
D. Restricting which HTTP methods the application accepts
E. Requiring that SSL be used
Ans: C

38. Which file may NOT be used to configure Cache settings?
A. bootstrap.php
B. core.php
C. routes.php
Ans: C

39. How does one create a transaction?
A. $dataSource->begin(); // Perform some tasks if (/*all’s well*/) { $dataSource->commit(); } else { $dataSource->rollback(); }
B. $this->Comment->delete($this->request->data(‘Comment.id’));
C. None of these
D. class User extends AppModel { public $validate = array( ‘login’ => ‘alphaNumeric’, ’email’ => ’email’, ‘born’ => ‘date’ ); }
Ans: A

40. What’s the name of the variable that holds a model validation rules?
A. $validate
B. $rules
C. $validationRules
D. $validation
Ans: A

41. Which of the following is an example of the definition of the find list function?
A. None of these
B. find(string $type = ‘list’, array $params = array())
C. find(‘first’, $params)
D. find(‘list’, $params)
Ans: D

42. What is the first file that gets loaded when you run a application using cakephp?
A. index.php
B. config.php
C. bootstrap.php
D. core.php
Ans: A

43. As related to the web server configuration, where is the index file properly located?
A. The webroot directory.
B. The top-level directory.
C. The system root directory.
D. The app directory.
Ans: A

44. How can you share logic between controllers?
A. Components
B. Helpers
C. Views
D. Behaviors
E. ControllerHelpers
Ans: A

45. What is the function of a model?
A. They are used to mediate input between Views and Controllers.
B. It is an object that represents application data, business rules and logic.
C. It is responsible for generating the specific output required for the request
Ans: B

46. To automatically get CSRF (Cross-site Request Forgery) and form tampering protection in CakePHP, what should be done?
A. Only use the Security Component
B. Use the FormHelper to create forms and add the Security Component to the controller
C. No need to do anything extra
D. Install Anti-Virus
E. Only use the FormHelper
Ans: B

47. True or False? CakePHP plugins are loaded automatically.
A. False
B. True
Ans: A

48. What does the ACL (Access Control Lists) Component provide?
A. Availability
B. Encryption
C. Authorization
D. Authentication
E. Integrity
Ans: C

49. CakePHP uses concept of _____
A. Configuration over Convention
B. Convention over configuration
Ans: B

50. What happens if CakePHP can’t find a file for a model object in the /app/Model folder?
A. Deletes the controller
B. Generates a SQL error
C. Generates an internal server error
D. Dynamically creates a model object for you
Ans: D

51. Which data retrieval function call is most suitable to build input select boxes?
A. find(‘first’)
B. field(‘list’)
C. find(‘all’)
D. find(‘select’)
E. find(‘list’)
Ans: E

52. Which model method requires values to be manually escaped?
A. Model::read()
B. Model::saveAssociated()
C. Model::saveField()
D. Model::query()
E. Model::find()
Ans: D

53. Which one is NOT a valid behavior callback?
A. beforeDelete()
B. beforeInitialize()
C. beforeSave()
D. afterFind()
E. beforeValidate()
Ans: B

54. Which database storage engine is not supported by the core installation?
A. MongoDB
B. PostgreSQL
C. Microsoft SQL Server
E. SQLite
Ans: A

55. What is the proper way to delete a record?
A. None of these
B. deleteAll(mixed $conditions, $cascade = true, $callbacks = false)
C. delete(int $condition = null, boolean $cascade = true);
D. delete(int $id = null, boolean $cascade = true);
Ans: D

56. When using the function query() to retrieve data what should you do?
A. Instantiate a database connection
B. Limit number of results to 500
C. Pass conditions in an array
D. Place in a callback method
E. Clean up user-provided data from injection and cross-site scripting attacks
Ans: E

57. Which data retrieval function call is not valid? (Table: users; Columns: id, email, name, username)
A. findById()
B. findByUsername()
C. findByAllEmail()
D. query(“select * from users”)
E. findAllByName()
Ans: C

58. How can you load all plugins at once?
A. CakePlugin::load(‘all’)
B. CakePlugin::load(true)
C. App::loadAllPlugins()
D. Plugin::loadAll()
E. CakePlugin::loadAll()
Ans: E

59. Which data retrieval function call is the most suitable to build nested results with the parent_id field?
A. get(‘nested’)
B. find(‘threaded’)
C. find(‘nested’)
D. field(‘all’)
E. find(‘all’)
Ans: B

60. What is the default value of $recursive?
A. 1
B. null
C. 2
D. -1
E. 0
Ans: A

61. Which of the following is not a built in ConsoleOutput style?
A. question
B. warning
C. flash
D. comment
E. info
Ans: C

62. In the context of Views, what do helper classes do?
A. Form the meat of the application’s response
B. View files that contain presentational code that is found wrapping many interfaces in your application
C. None of these
D. Build forms, build AJAX functionality, or serve RSS feeds
Ans: D

63. What will the following example do (The order_items table has Order.order_id as a foreign key)? $this->Order->deleteAll(array(‘Order.complete’ => true), false);
A. Deletes all orders and order_items
B. Deletes only orders that are complete
C. Deletes all order_items that have completed orders
D. Deletes all orders that are incomplete
E. Deletes orders that are complete and the associated order_items
Ans: B

64. hich class handles request parameters and contains any data submitted with the request?
A. CakeResponse
B. CakeRequest
C. HttpSocketRequest
D. RequestHandler
E. Controller::$params
Ans: B

65. What class in CakePHP must be active in order for a user to see the error, “The request has been black-holed”?
A. RequestHandlerComponent
B. BaseAuthenticate
C. AuthComponent
D. SecurityComponent
E. UserModel
Ans: D

66. How would you express the following SQL condition in CakePHP (>=1.3.x)? “WHERE User.username NOT IN (‘jdoe’,’jsmith’,’ajones’)”
A. array(“NOT”=>array(“User.username”=>array(‘jdoe’,’jsmith’,’ajones’)))
B. None of these
C. array(“User.username”=>array(“NOT”=>array(‘jdoe’,’jsmith’,’ajones’)))
D. array(“User.username NOT IN “=>array(‘jdoe’,’jsmith’,’ajones’))
Ans: A

67. Which of the following is NOT a View Class in CakePHP?
C. Media
E. Themes
Ans: D

68. Which of the following is NOT a settable parameter used in Media views?
A. id
B. extension
C. name
D. download
E. category
Ans: E

69. Which route only passes integers to the controller action?
A. Router::connect(‘/blog/:id’, array(‘controller’ => ‘blog’, ‘action’ => ‘view’), array(‘pass’ => array(‘id’), ‘id’ => ‘[a-z][0-9]+’));
B. Router::connect(‘/blog/:id’, array(‘controller’ => ‘blog’, ‘action’ => ‘view’), array(‘id’ => ‘[0-9]+’));
C. Router::connect(‘/blog/:id’, array(‘controller’ => ‘blog’, ‘action’ => ‘view’), array(‘pass’ => array(‘id’), ‘id’ => ‘[0-9]+’));
D. Router::link(‘/blog/:id’, array(‘controller’ => ‘blog’, ‘action’ => ‘view’), array(‘pass’ => array(‘id’), ‘id’ => ‘[0-9]+’));
Ans: C

70. Which of the following is not a way to retrieve data from a model?
A. (in Model) $this->findAllByActive(‘true’);
B. (In Model) $this->find(‘all’, array(‘conditions’ => array(‘active’ => true)));
C. (In ModelController) $this->Model->find(‘all’, array(‘conditions’ => array(‘active’ => true)));
D. (In ModelController) $this->find(‘all’, array(‘conditions’ => array(‘active’ => true)));
Ans: D

71. When unit testing controller actions with ControllerTestCase, which of the following is NOT a built-in return type:
A. vars – Get the set view variables.
B. contents – Get the rendered view, including layout.
C. params – Get the values of all method parameters passed.
D. view – Get the rendered view, without a layout.
E. result – Get the return value of the controller action.
Ans: C

72. Which one below is not a Session configuration option?
A. Session.terminate
B. Session.cookie
C. Session.handler
D. Session.autoRegenerate
E. Session.ini
Ans: A

73. Which of the following is NOT a method that must be implemented for all CRUD methods?
A. calculate($model, $func, $params)
B. find(‘list’, $params)
C. listSources($data = null)
D. describe($model)
Ans: B

74. On which layer could you implement your own paginateCount() method?
A. Helper
B. Controller
C. Behavior
D. DataSource
Ans: c

75. Which TextHelper method allows you to transform links inside any text to valid HTML link tags?
A. processLinks()
B. automaticUrls()
C. autoLink()
D. addLinks()
Ans: C

76. Which of the following is not a built-in validation rule name?
A. ‘custom’
B. ‘datetime’
C. ‘between’
D. ‘alphanumeric’
E. ‘inList’
Ans: D

77. Which testing method allows you to test HTML generation easily?
A. assertHTML()
B. assertTags()
C. assertCode()
D. assertOutput()
Ans: B

Posted in CakePHP MCQs | Tagged , , , , , , , , , , , | Leave a comment