Safcode | Code Your Ideas by Sir Safder
+923132835245
safcodeinstitute@gmail.com
Online Quiz
10000+ Questions!
Students Works
Ideas & Topics!
Live Coding
HTML & CSS
Home
(current)
About
Courses
CIT
Web Designing
Office Automation
Graphics Designing
Web Development
Software Development
Digital Marketing
App Development
Amazon Virtual Assistant
YouTube Earning
WordPress Development
Tutorials
Feedback
Programming Notes
Contact
Test Your Programming Skills with Safcode!
Here is all important interview / exams questions.
Student doing practice apptitude test on safcode platform.
Instruction: "Total Number of Questions: 20
Each question carry 10 mark , no negative marking"
Quiz Start
1. The main reason to use the query builder over writing SQL code manually is because _________.
It is rich in features
It uses configuration mode for migration
It has few SQLite directives
It uses configuration mode for migration
View Answer
2. What gets printed?
37
33
38
32
View Answer
3. Which of the following enables the user to add elements to the project that follow the Laravel convention?
Artisan Tool
Convention
Laravel Components
Composer
View Answer
4. Which of the following is the way to create comments in PHP?
/* commented code here */
all of the above
# commented code to end of line
// commented code to end of line
View Answer
5. How do I create PHP arrays in a HTML
?
" required /> < input name="MyArray[]" />
< input MyArray[] />
< input name= MyArray[]/>
" required /> < input ="MyArray[]" />
View Answer
6. In which variable is the users IP address stored?
$DOMAIN
$GLOBALS
$REMOTE_ADDR
$_ENV
View Answer
7. The ____________ file in windows is the first file that is referenced when the operating system tries to resolve a domain name.
Local
Hosta
All of them
Public
View Answer
8. Which of the following is used to declare a constant?
constant
define
const
#pragma
View Answer
9. ____________ function in PHP Returns a list of response headers sent (or ready to send)
header()
headers_list()
Header_send()
header_sent()
View Answer
10. What is the difference between echo and print?
They both behave the same.
Print is a function where as echo is not.
Print can take multiple parameters where as echo cannot
Echo can take multiple parameters where as print cannot
View Answer
11. What will be the value of $var?
1
0.5
0
0.2
View Answer
12. Laravel uses the ________ design pattern.
None of These
Model-View-Controller
Wordpress
CakePHP
View Answer
13. Functions that are defined in the model and that replace along chain with a simple one are called _____.
None of Them
Eloquent ORM
Model Events
Event Listener
View Answer
14. What is the purpose of $_SESSION[]?
Used to initialize a session.
Used to store variables of the current session
Used to register a global variable
none of the above
View Answer
15. 'd' later? $a = array( 'a', 3 => 'b', 1 => 'c', 'd' );
$a[4]
$a[1]
$a[2]
$a[3]
View Answer
16. What is the strpos() function used for?
Search for character within a string
Locate position of a string’s first character
None of these
Find the last character of a string
View Answer
17. Which function is used to Strip whitespace (or other characters) from the beginning and end of a string?
strip_str
trim_str
trim
strip
View Answer
18. In Key value pairs, the value should contain validating keywords separated by the _______ symbol.
*
$
#
|
View Answer
19. The Update operation is similar to the ______ operation.
Create
Edit
Update
None of Them
View Answer
20. _________ automatically assign routes to all functions that have been declared in the Resource.
Resource Routing
Requests
All of Them
Yield
View Answer