HTML, PHP, C, C++, and Java Programming Language MCQs

Enter to Study the HTML, PHP, C, C++, and Java Programming Language MCQs for FPSC, PPSC, SPSC, KPSC, BPSC, NTS, and PTS Job Test Preparation.

HTML, PHP, C, C++, and Java Programming Language MCQs. This type of test HTML, PHP, C, C++, and Java Programming Language MCQs. Programming Languages Knowledge is becoming most common part of today's competitive examinations like FPSC, PPSC, SPSC, KPSC, BPSC, NTS, and PTS. Without basic programming knowledge, candidates lag behind in these examinations. Keeping in view the importance of Programming Languages, we have added some important MCQs on Internet, Web and Mail for your proper practice.
  • [message]
    • Instructions:
      • Choose your answer carefully on the basis of previous knowledge. Click on the Option (A, B, C, D) to Choose your Answer. Then Click on Show Answer for Correct Option.

Q. HTML is what type of language ?

A.
Scripting Language
B.
Markup Language

C.
Programming Language
D.
Network Protocol


Show Answer

Q. HTML uses

A.
User defined tags
B.
Pre-specified tags

C.
Fixed tags defined by the language
D.
Tags only for linking


Show Answer

Q. The year in which HTML was first proposed _______.

A.
1990
B.
1980

C.
2000
D.
1995


Show Answer

Q. Fundamental HTML Block is known as ___________.

A.
HTML Body
B.
HTML Tag

C.
HTML Attribute
D.
HTML Element


Show Answer

Q. Apart from <b> tag, what other tag makes text bold ?

A.
<fat>
B.
<strong>

C.
<black>
D.
<emp>


Show Answer

Q. What is the full form of HTML?

A.
HyperText Markup Language
B.
Hyper Teach Markup Language

C.
Hyper Tech Markup Language
D.
None of these


Show Answer

Q. Who is Known as the father of World Wide Web (WWW)?

A.
Robert Cailliau
B.
Tim Thompson

C.
Charles Darwin
D.
Tim Berners-Lee


Show Answer

Q. What should be the first tag in any HTML document?

A.
<head>
B.
<title>

C.
<html>
D.
<document>


Show Answer

Q. How can you make a bulleted list with numbers?

A.
<dl>
B.
<ol>

C.
<list>
D.
<ul>


Show Answer

Q. What tag is used to display a picture in a HTML page?

A.
picture
B.
image

C.
img
D.
src


Show Answer

Q. HTML web pages can be read and rendered by _________.

A.
Compiler
B.
Server

C.
Web Browser
D.
Interpreter


Show Answer

Q. Which of the following is not a browser ?

A.
Microsofts Bing
B.
Netscape Navigator

C.
Mozilla Firefox
D.
Opera


Show Answer

Q. Which HTML tag produces the biggest heading?

A.
<h7>
B.
<h9>

C.
<h4>
D.
<h1>


Show Answer

Q. HTML tags are surrounded by which type of brackets.

A.
Curly
B.
Round

C.
Squart
D.
Angle


Show Answer

Q. Tags and test that are not directly displayed on the page are written in _____ section.

A.
<head>
B.
<title>

C.
<body>
D.
<html>


Show Answer

Q. PHP Stands for?

A.
PHP Hypertex Processor
B.
PHP Hyper Markup Processor

C.
PHP Hyper Markup Preprocessor
D.
PHP Hypertext Preprocessor


Show Answer

Q. PHP is an example of ___________ scripting language.

A.
Server-side
B.
Client-side

C.
Browser-side
D.
In-side


Show Answer

Q. Who is known as the father of PHP?

A.
Rasmus Lerdorf
B.
Willam Makepiece

C.
Drek Kolkevi
D.
List Barely


Show Answer

Q. Which of the following is not true?

A.
PHP can be used to develop web applications.
B.
PHP makes a website dynamic

C.
PHP applications can not be compile
D.
PHP can not be embedded into html.


Show Answer

Q. PHP scripts are enclosed within _______

A.
<php> . . . </php>
B.
<?php . . . ?>

C.
?php . . . ?php
D.
<p> . . . </p>


Show Answer

Q. Which of the following variables is not a predefined variable?

A.
$get
B.
$ask

C.
$request
D.
$post


Show Answer

Q. When you need to obtain the ASCII value of a character which of the following function you apply in PHP?

A.
chr( );
B.
asc( );

C.
ord( );
D.
val( );


Show Answer

Q. Which of the following method sends input to a script via a URL?

A.
Get
B.
Post

C.
Both
D.
None


Show Answer

Q. Which of the following function returns a text in title case from a variable?

A.
ucwords($var)
B.
upper($var)

C.
toupper($var)
D.
ucword($var)


Show Answer

Q. Which of the following function returns the number of characters in a string variable?

A.
count($variable)
B.
len($variable)

C.
strcount($variable)
D.
strlen($variable)


Show Answer

Q. Who is known as the father of C Language ?

A.
James A. Sosling
B.
Vjarne Stroustrup

C.
Dennis Ritchie
D.
Dr. E. F. Codd


Show Answer

Q. C Language was developed in the year ____

A.
1970
B.
1975

C.
1980
D.
1985


Show Answer

Q. Which one is not a reserve keyword in C Language?

A.
auto
B.
main

C.
case
D.
register


Show Answer

Q. A C variable name can start with a ____

A.
Number
B.
Plus Sign (+)

C.
Underscore
D.
Asterisk (*)


Show Answer

Q. Prototype of a function means _____

A.
Name of Function
B.
Output of Function

C.
Declaration of Function
D.
Input of a Function


Show Answer

Q. Name the loop that executes at least once.

A.
For
B.
If

C.
do-while
D.
while


Show Answer

Q. Far pointer can access _____

A.
Single memory location
B.
No memory location

C.
All memory location
D.
First and Last Memory Address


Show Answer

Q. A pointer pointing to a memory location of the variable even after deletion of the variavle is known as _____

A.
far pointer
B.
dangling pointer

C.
null pointer
D.
void pointer


Show Answer

Q. An uninitialized pointer in C is called ___

A.
Constructor
B.
dangling pointer

C.
Wild Pointer
D.
Destructor


Show Answer

Q. A pointer that is pointing to NOTHING is called ____

A.
VOID Pointer
B.
DANGLING Pointer

C.
NULL Pointer
D.
WILD Pointer


Show Answer

Q. Delaration a pointer more than once may cause ____

A.
Error
B.
Abort

C.
Trap
D.
Null


Show Answer

Q. Which one is not a correct variable type in C++?

A.
float
B.
real

C.
int
D.
double


Show Answer

Q. Which operation is used as Logical 'AND'

A.
Operator-&
B.
Operator-||

C.
Operator-&&
D.
Operator +


Show Answer

Q. An expression A.B in C++ means ____

A.
A is member of object B
B.
B is member of Object A

C.
Product of A and B
D.
None of these


Show Answer

Q. A C++ code line ends with ___

A.
A Semicolon (;)
B.
A Fullstop(.)

C.
A Comma (,)
D.
A Slash (/)


Show Answer

Q. ______ function is used to allocate space for array in memory.

A.
malloc()
B.
realloc()

C.
alloc()
D.
calloc()


Show Answer

Q. A ponter pointing to a variable that is not initialized is called ____

A.
Void Pointer
B.
Null Pointer

C.
Empty Pointer
D.
Wild Pointer


Show Answer

Q. Default constructor has ____ arguments.

A.
No argument
B.
One Argument

C.
Two Argument
D.
None of these


Show Answer

Q. A class whos objects can not be created is known as _____

A.
Absurd Class
B.
Dead Class

C.
Super Class
D.
Abstract Class


Show Answer

Q. Which class allows only one object to be created.

A.
Nuclear Family Class
B.
Abstruct Class

C.
Sigleton Class
D.
Numero Uno Class


Show Answer

Q. Reusability of code in C++ is achieved through ____

A.
Polymorphism
B.
Inheritance

C.
Encapsulation
D.
Both A and B


Show Answer

Q. In CPP, members of a class are ______ by default.

A.
Public
B.
Private

C.
Protected
D.
Static


Show Answer

Q. In C++ Program, inline fuctions are expanded during ____

A.
Run Time
B.
Compile Time

C.
Debug Time
D.
Coding Time


Show Answer

Q. To perfor file input / output operation in C++, we must include which header file ?

A.
<fiostream>
B.
<ifstream>

C.
<ofstream>
D.
<fstream>


Show Answer

Q. An exceptio in C++ can be generated using which keywords.

A.
thrown
B.
threw

C.
throw
D.
throws


Show Answer

Q. Who is known as father of Java Programming Language?

A.
James Gosling
B.
M. P Java

C.
Charel Babbage
D.
Blais Pascal


Show Answer

Q. In java control statements break, continue, return, try-catch-finally and assert belongs to?

A.
Selection statements
B.
Loop Statements

C.
Transfer statements
D.
Pause Statement


Show Answer

Q. Which provides runtime environment for java byte code to be executed?

A.
JDK
B.
JVM

C.
JRE
D.
JAVAC


Show Answer

Q. What is byte code in Java?

A.
Code generated by a Java compiler
B.
Code generated by a Java Virtual Machine

C.
Name of Java source code file
D.
Block of code written inside a class


Show Answer

Q. Which of the following are not Java keywords ?

A.
double
B.
switch

C.
then
D.
instanceof


Show Answer

Q. Which of these have highest precedence?

A.
()
B.
++

C.
*
D.
>>


Show Answer

Q. Which of these is returned by operator �#039;&' ?

A.
Integer
B.
Character

C.
Boolean
D.
Float


Show Answer

Q. Data type long literals are appended by _____

A.
Uppercase L
B.
Lowercase L

C.
Long
D.
Both A and B


Show Answer

Q. Which variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed?

A.
Local variables
B.
Instance variables

C.
Class Variables
D.
Static variables


Show Answer

Q. Java language was initially called as ________

A.
Sumatra
B.
J++

C.
Oak
D.
Pine


Show Answer

Q. What is garbage collection in the context of Java?

A.
Java deletes all unused java files on the system.
B.
Memory used by the object with no reference is automatically reclaimed.

C.
The JVM cleans output of Java program with error.
D.
Any unused package in a program automatically gets deleted.


Show Answer

Q. Which one is a template for creating different objects ?

A.
An Array
B.
A class

C.
Interface
D.
Method


Show Answer

Q. Which symbol is used to contain the values of automatically initialized arrays?

A.
Brackets
B.
Braces

C.
Parentheses
D.
Comma


Show Answer

Q. Which one is true about a constructor ?

A.
A constructor must have the same name as the class it is declared within.
B.
A constructor is used to create objects.

C.
A constructor may be declared private
D.
All of the above


Show Answer

Q. Which of these operators is used to allocate memory to array variable in Java?

A.
alloc
B.
malloc

C.
new malloc
D.
new


Show Answer

Q. Which of these is not a bitwise operator?

A.
&' Operator
B.
&=' Operator

C.
|=' Operator
D.
<=' Operator


Show Answer

Q. Which of these is returned by Greater Than, Less Than and Equal To (i.e Relational) operator ?

A.
Fload
B.
Integer

C.
Boolean
D.
Double


Show Answer

Q. Which statement transfer execution to different parts of your code based on the value of an expression?

A.
If
B.
Switch

C.
Nested-if
D.
if-else-if


Show Answer

Q. Modulus operator (%) can be applied to which of these?

A.
Integers
B.
Floating - point numbers

C.
Both A and B
D.
None of These


Show Answer

Q. What feature of OOP has a super-class sub-class concept?

A.
Hierarchical inheritance
B.
Single inheritance

C.
Multiple inheritances
D.
Multilevel inheritance


Show Answer

Q. Which of the following are not the methods of the Thread class?

A.
yield()
B.
sleep(long msec)

C.
go()
D.
stop()


Show Answer

Q. Division operator has ____ precedence over multiplication operator

A.
Heighest
B.
Least

C.
Equal
D.
None of These


Show Answer

Q. What is the full form of JVM ?

A.
Java Very Large Machine
B.
Java Verified Machine

C.
Java Very Small Machine
D.
Java Virtual Machine


Show Answer

Q. In Java code, the line that begins with /* and ends with */ is known as?

A.
Multiline comment
B.
Single line comment

C.
Both A & B
D.
None of these


Show Answer

Q. Which of the following are not Java modifiers?

A.
public
B.
private

C.
friendly
D.
transient


Show Answer

COMMENTS

Name

Biology 10th,9,Biology 9th,9,Blog,27,Career Development,4,Chemistry 10th,8,Chemistry 9th,8,Classroom Management,2,Computer,17,Computer 9th,8,Current Affairs,7,Education News,13,English,12,Everyday Science,14,General Knowledge,25,General Science,6,Intelligence Tests,2,Interview,2,IQ Tests,5,Islamic Studies,10,Mathematics,8,Mathematics 10th,7,Mathematics 9th,18,PAF Cadet College Lower Topa,10,Pakistan Studies,5,Past Papers,9,Physics 10th,9,Physics 9th,9,Programming,1,Student Counseling,12,Urdu,6,Verbal Aptitude Tests,2,Verbal Reasoning Tests,2,Video,5,
ltr
item
Enter To Study: HTML, PHP, C, C++, and Java Programming Language MCQs
HTML, PHP, C, C++, and Java Programming Language MCQs
Enter to Study the HTML, PHP, C, C++, and Java Programming Language MCQs for FPSC, PPSC, SPSC, KPSC, BPSC, NTS, and PTS Job Test Preparation.
Enter To Study
https://www.entertostudy.com/2018/12/programming-mcqs-test.html
https://www.entertostudy.com/
https://www.entertostudy.com/
https://www.entertostudy.com/2018/12/programming-mcqs-test.html
true
1254132765608278196
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy