aptitude_PHP Numbers Aptitude问题与解答

aptitude

This section contains Aptitude Questions and Answers on PHP Numbers.

本节包含有关PHP数字的能力问题。

1) PHP supports automatic type conversion?
  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, PHP supports automatic type conversion.

1)PHP是否支持自动类型转换?
  1. 没有

答案与解释

正确答案:1

是的,PHP支持自动类型转换。

2) Which of the following function is used to check a variable contains an integer number?
  1. is_int()

  2. isint()

  3. isinteger()

  4. None of the above

Answer & Explanation

Correct answer: 1
is_int()

The is_int() function is used to check a variable contains an integer number.

2)以下哪个函数用于检查变量是否包含整数?
  1. is_int()

  2. isint()

  3. isinteger()

  4. 以上都不是

答案与解释

正确答案:1
is_int()

is_int()函数用于检查包含整数的变量。

3) What is the correct output of the given code snippets?
<?php
$num = 1234;
var_dump(is_integer($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print "bool(true)" on the webpage.

3)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印“ bool(true)”

4) What is the correct output of the given code snippets?
<?php
$num = 1234;
var_dump(is_integer($num));
$num = 12.34;
var_dump(is_integer($num));
?>  

  1. bool(true)

  2. bool(false)

  3. bool(true) bool(false)

  4. Error

Answer & Explanation

Correct answer: 3
bool(true) bool(false)

The above code will print "bool(true) bool(false)" on the webpage.

4)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. bool(true)bool(false)

  4. 错误

答案与解释

正确答案:3
bool(true)bool(false)

上面的代码将在网页上打印“ bool(true)bool(false)”

5) Which of the following function is not available in PHP?
  1. is_int()

  2. is_integer()

  3. is_long()

  4. is_short()

Answer & Explanation

Correct answer: 4
is_short()

The is_short() function is not available in PHP.

5)以下哪个功能在PHP中不可用?
  1. is_int()

  2. is_integer()

  3. 长()

  4. 是短()

答案与解释

正确答案:4
是短()

is_short()函数在PHP中不可用。

6) Which of the following function is not available in PHP?
  1. is_float()

  2. is_double()

  3. is_longdouble()

  4. is_integer()

Answer & Explanation

Correct answer: 3
is_longdouble()

The is_longdouble() function is not available in PHP.

6)以下哪个功能在PHP中不可用?
  1. is_float()

  2. is_double()

  3. is_longdouble()

  4. is_integer()

答案与解释

正确答案:3
is_longdouble()

is_longdouble()函数在PHP中不可用。

7) What is the correct output of the given code snippets?
<?php
$num = 12.34;
var_dump(is_double($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print "bool(true)" on the webpage.

7)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印“ bool(true)”

8) What is the correct output of the given code snippets?
<?php
$num = 12.34F;
var_dump(is_double($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 3
Error

The above code will generate an error.

8)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:3
错误

上面的代码将产生错误。

9) What is the correct output of the given code snippets?
<?php
$num = 12.34;
var_dump(is_float($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print "bool(true)" on the webpage.

9)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印“ bool(true)”

10) The is_float() function is alias of is_double() function in PHP?
<?php
define("COUNTRIES", ["INDIA","AUSTRALIA","USA"]);
echo COUNTRY[1];    
?>

  1. Yes

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, the is_float() function is alias of is_double() function in PHP.

10)is_float()函数是PHP中is_double()函数的别名吗?
  1. 没有

答案与解释

正确答案:1

是的, is_float()函数是PHP中is_double()函数的别名。

11) Which of the following functions are used to check numbers infinity in PHP?
  1. is_finite()

  2. is_infinite()

  3. isfinite()

  4. isinfinite()

Options:

  1. Only A

  2. Only B

  3. A and B

  4. C and D

Answer & Explanation

Correct answer: 3
A and B

The is_finite() and is_infinite() functions are used to check numbers infinity in PHP.

11)以下哪个函数用于检查PHP中的数字无穷大?
  1. is_finite()

  2. is_infinite()

  3. isfinite()

  4. isinfinite()

选项:

  1. 只有一个

  2. 只有B

  3. A和B

  4. C和D

答案与解释

正确答案:3
A和B

is_finite()和is_infinite()函数用于检查PHP中的数字无穷大。

12) What is the correct output of the given code snippets?
<?php
$num = 1234;
var_dump(is_nan($num));
?>

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 2
bool(false)

The above code will print "bool(false)" on the webpage.

12)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:2
布尔值(false)

上面的代码将在网页上打印“ bool(false)”

13) What is the correct output of the given code snippets?
<?php
$num = "ABC";
var_dump(is_numeric($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 2
bool(false)

The above code will print "bool(false)" on the webpage.

13)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:2
布尔值(false)

上面的代码将在网页上打印“ bool(false)”

14) What is the correct output of the given code snippets?
<?php
$num = "123";
var_dump(is_numeric($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print "bool(true)" on the webpage.

14)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印“ bool(true)”

15) What is the correct output of the given code snippets?
<?php
$num = "123.45";
var_dump(is_numeric($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print "bool(true)" on the webpage.

15)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印“ bool(true)”

16) Which of the following are used for type conversion in PHP?
  1. int

  2. integer

  3. intval

  4. int_val

Options:

  1. A and B

  2. A and C

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 3
A, B, and C

The int, integer, and intval are used for type conversion in PHP.

16)以下哪项用于PHP中的类型转换?
  1. 整型

  2. 整数

  3. 间隔

  4. int_val

选项:

  1. A和B

  2. A和C

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:3
A,B和C

int , integer和intval用于PHP中的类型转换。

17) What is the correct output of the given code snippets?
<?php
$num1 = "123";    
$num2 = int($num1);
echo $num2;    
?>  

  1. 123

  2. "123"

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 3
Error

The above code will generate a syntax error.

17)给定代码段的正确输出是什么?
  1. 123

  2. “ 123”

  3. 错误

  4. 以上都不是

答案与解释

正确答案:3
错误

上面的代码将生成语法错误。

18) What is the correct output of the given code snippets?
<?php
$num1 = "123";
$num2 = intval($num1);
echo $num2;
?>  

  1. 123

  2. "123"

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
123

The above code will print "123" on the webpage.

18)给定代码段的正确输出是什么?
  1. 123

  2. “ 123”

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
123

上面的代码将在网页上打印“ 123”。

19) What is the correct output of the given code snippets?
<?php
$num1 = "123";
$num2 = integer($num1);
echo $num2;
?>  

  1. 123

  2. "123"

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 3
Error

The above code will generate a syntax error.

19)给定代码段的正确输出是什么?
  1. 123

  2. “ 123”

  3. 错误

  4. 以上都不是

答案与解释

正确答案:3
错误

上面的代码将生成语法错误。

20) What is the correct output of the given code snippets?
<?php
$num1 = "123";
$num2 = (integer)$num1;
echo $num2;
?>  

  1. 123

  2. "123"

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
123

The above code will print "123" on the webpage.

20)给定代码段的正确输出是什么?
  1. 123

  2. “ 123”

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
123

上面的代码将在网页上打印“ 123”

21) What is the correct output of the given code snippets?
<?php
$num1 = "ABC";
$num2 = (int)$num1;
echo $num2;
?>

  1. 123

  2. 0

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 2
0

The above code will print "0" on the webpage.

21)给定代码段的正确输出是什么?
  1. 123

  2. 0

  3. 错误

  4. 以上都不是

答案与解释

正确答案:2
0

上面的代码将在网页上打印“ 0”

22) What is the correct output of the given code snippets?
<?php
$num1 = "ABC";
$num2 = intval($num1);
echo $num2;
?>  

  1. 123

  2. 0

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 2
0

The above code will print "0" on the webpage.

22)给定代码段的正确输出是什么?
  1. 123

  2. 0

  3. 错误

  4. 以上都不是

答案与解释

正确答案:2
0

上面的代码将在网页上打印“ 0”

23) What is the correct output of the given code snippets?
<?php
$num = "123" + 45;
var_dump(isnumeric($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 3
Error

The above code will generate a syntax error.

23)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:3
错误

上面的代码将生成语法错误。

24) What is the correct output of the given code snippets?
<?php
$num = "123" + 45;
var_dump(is_numeric($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print "bool(true)" on the webpage.

24)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印“ bool(true)”

25) What is the correct output of the given code snippets?
<?php
$num = "ABC";
var_dump(is_nan($num));
?>  

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 4
None of the above

The above code will print "NULL" on the webpage.

25)给定代码段的正确输出是什么?
  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:4
以上都不是

上面的代码将在网页上显示“ NULL”

翻译自: https://www.includehelp.com/php/numbers-aptitude-questions-and-answers.aspx

aptitude

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/544345.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SpringBoot + ShardingSphere 秒级分库分表!

Spring Boot 作为主流微服务框架&#xff0c;拥有成熟的社区生态。市场应用广泛&#xff0c;为了方便大家&#xff0c;整理了一个基于spring boot的常用中间件快速集成入门系列手册&#xff0c;涉及RPC、缓存、消息队列、分库分表、注册中心、分布式配置等常用开源组件&#xf…

JAVA基础之自定义容器实现

容器 容器主要是指Collection所包含的实现类&#xff0c;常用的有List、Map以及Set三种结构。本文主要介绍了几种常见的集合实现类&#xff0c;对它们进行自定义实现。 ArrayList&#xff1a;有序的容器列表&#xff0c;顺序存储着元素&#xff0c;可以使用下标进行索引&…

git reset, git checkout, git revert 区别 (译)

博客原文地址: http://blog.mexiqq.com/index.php/archives/3/题记&#xff1a;团队中大多数成员使用 sourceTree 和 github 两款 git 工具&#xff0c;然而大家对于图形化工具提供的 reset,checkout,revert 功能点并不是很了解&#xff0c;甚至于混淆,然后凭借猜测去使用。功夫…

Redis笔记之基本数据结构 动态字符串SDS

简单动态字符串 传统上的C语言的字符串表示是以空字符结尾的字符数组&#xff08;C字符串&#xff09;&#xff0c;redis自己实现一个动态字符串&#xff08;SDS&#xff09;&#xff0c;两者之间的区别以及使用SDS的好处有&#xff1a; 结构不同。C字符串以空字符结尾的字符…

weakhashmap_Java WeakHashMap size()方法与示例

weakhashmapWeakHashMap类的size()方法 (WeakHashMap Class size() method) size() method is available in java.util package. size()方法在java.util包中可用。 size() method is used to get the number of key-value pairs that exist in this map. size()方法用于获取此映…

扯一把 Spring 的三种注入方式,到底哪种注入方式最佳?

1. 实例的注入方式首先来看看 Spring 中的实例该如何注入&#xff0c;总结起来&#xff0c;无非三种&#xff1a;属性注入set 方法注入构造方法注入我们分别来看下。1.1 属性注入属性注入是大家最为常见也是使用最多的一种注入方式了&#xff0c;代码如下&#xff1a;Service p…

在项目中引入领域驱动设计的经验

Chris Patuzzo近期在一次演讲中介绍了领域驱动设计&#xff08;DDD&#xff09;的原则&#xff0c;并结合一个基于Ruby on Rails的真实项目进行讲解。在这次项目之前&#xff0c;Chris所在的团队为重新设计公司的主营网站所做的两个概念验证都因为可伸缩性方面的问题而失败了。…

Redis笔记之基本数据结构 链表

链表 链表具有空间存储不连续&#xff0c;增删节点快的优点&#xff0c;因此redis在列表键、发布与订阅、慢查询、监视器等使用了链表作为底层实现。由于C语言中没有内置的链表实现&#xff0c;因此redis自己进行了实现。 双向链表。每个listtNode都有perv和next指针&#x…

treeset java_Java TreeSet iterator()方法与示例

treeset javaTreeSet类的iterator()方法 (TreeSet Class iterator() method) iterator() method is available in java.util package. iterator()方法在java.util包中可用。 iterator() method is used to iterate the elements of this TreeSet is ascending or increasing or…

SpringCloud组件:Ribbon负载均衡策略及执行原理!

大家好&#xff0c;我是磊哥。今天我们来看下微服务中非常重要的一个组件&#xff1a;Ribbon。它作为负载均衡器在分布式网络中扮演着非常重要的角色。本篇主要内容如下&#xff1a;在介绍 Ribbon 之前&#xff0c;不得不说下负载均衡这个比较偏僻的名词。为什么说它偏僻了&…

Redis笔记之基本数据结构 字典

字典 符号表、关联数组或者映射&#xff0c;有点类似于java中的map&#xff0c;用于保存键值对key-value。字典中的键key是独一无二的。底层实现为哈希表。下面进行简述&#xff1a; 哈希表。哈希表主要包含table数组、size、sizemask以及used。table用于保存哈希表节点&…

【零基础学习iOS开发】【02-C语言】02-第一个C语言程序

本文目录 前言一、编写第一个C语言程序-Hello World二、编译程序三、链接程序四、运行程序五、总结六、学习建议七、clang指令汇总回到顶部前言 前面已经唠叨了这么多理论知识&#xff0c;从这讲开始&#xff0c;就要通过接触代码来学习C语言的语法。学习任何一门语言&#xff…

安卓平板体验Java开发,还能白嫖一年阿里无影云,真香!(内含白嫖方法,人人可领)...

作者 | 磊哥来源 | Java中文社群&#xff08;ID&#xff1a;javacn666&#xff09;转载请联系授权&#xff08;微信ID&#xff1a;GG_Stone&#xff09;阿里无影云早有耳闻&#xff0c;前两天看朋友发体验照片&#xff0c;可能是程序员天生爱折腾的特性又发挥作用了&#xff0c…

Linux命令(三)

echo&#xff1a;输出信息echo ”abc”echo “字符串” |passwd --stdin USERNAME :利用管道修改用户密码输出重定向&#xff1a;>覆盖输出&#xff08;会覆盖原文件中的内容&#xff09;>>追加输出 &#xff08;原有内容会被保留&#xff09;Set –c &#xff1a…

strictmath_Java StrictMath scalb()方法与示例

strictmathStrictMath类scalb()方法 (StrictMath Class scalb() method) Syntax: 句法&#xff1a; public static double scalb(double do , int sf);public static float scalb(float fl , int sf);scalb(double do , int sf) method is used to return do* 2 raised to the…

你知道group by的工作原理和优化思路吗?

前言 日常开发中&#xff0c;我们经常会使用到group by。亲爱的小伙伴&#xff0c;你是否知道group by的工作原理呢&#xff1f;group by和having有什么区别呢&#xff1f;group by的优化思路是怎样的呢&#xff1f;使用group by有哪些需要注意的问题呢&#xff1f;本文将跟大家…

strictmath_Java StrictMath hypot()方法与示例

strictmathStrictMath类hypot()方法 (StrictMath Class hypot() method) hypot() method is available in java.lang package. hypot()方法在java.lang包中可用。 hypot() method is used to return the square root of sqrt(sq(d1)sq(d2)) without any intermediate operation…

关Jquery判断input type=checkbox元素是否被选中的判断

2019独角兽企业重金招聘Python工程师标准>>> 在用到复选框的时候&#xff0c;想在js中判断chekbox是否被选中 <input name"isPermit" id"isPermit" type"checkbox"> 百度了很多的判断方法 1、 if($("#isPermit").att…

Redis夺命十二问,你能扛到第几问?

Redis是面试中绕不过的槛&#xff0c;只要在简历中写了用过Redis&#xff0c;肯定逃不过。今天我们就来模拟一下面试官在Redis这个话题上是如何一步一步深入&#xff0c;全面考察候选人对于Redis的掌握情况。小张&#xff1a;面试官&#xff0c;你好。我是来参加面试的。面试官…

Java Scanner nextLine()方法与示例

扫描仪类nextLine()方法 (Scanner Class nextLine() method) nextLine() method is available in java.util package. nextLine()方法在java.util包中可用。 nextLine() method is used to get the skipped line. nextLine()方法用于获取跳过的行。 nextLine() method is a non…