相关疑难解决方法(0)

++ i和i ++有什么区别?

在C中,使用++i和之间有什么区别i++,哪些应该在for循环的增量块中使用?

c for-loop pre-increment post-increment

818
推荐指数
19
解决办法
96万
查看次数

前减量与后减量

什么时候应该使用前减量,什么时候使用后减量?

对于以下代码片段,我应该使用 pre 还是 post 递减。

static private void function(int number)
{
    charArr = new char[number];
    int i = 0;
    int tempCounter;
    int j = 0;
    while(charrArr!=someCharArr)
    {
        tempCounter = number - 1;
        password[tempCounter] = element[i%element.Length];
        i++;
        //This is the loop the I want to use the decrementing in.
        //Suppose I have a char array of size 5, the last element of index 5 is updated
        //in the previous statement.
        //About the upcoming indexes 4, 3, 2, 1 and ZERO. …
Run Code Online (Sandbox Code Playgroud)

c# decrement

4
推荐指数
1
解决办法
1万
查看次数

Java中的++int是什么?

可能的重复:
解释 Java 中 post 和 pre 增量运算符的工作
int++ 和 ++int 之间有什么区别?

在 Java 中,什么是++int?它有什么作用?这是什么意思?

(抱歉,上次我没有正确提问。)

java int

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

c ×1

c# ×1

decrement ×1

for-loop ×1

int ×1

java ×1

post-increment ×1

pre-increment ×1