566 views|5 replies

3181

Posts

0

Resources
The OP
 

ZTE interview questions [Copy link]

1. When the following program is running, if you input from the keyboard: 10 20 30<Enter>, the output result is______

```c
main()
{
int i=0,j=0,k=0;
scanf("%d%*d%d",&i,&j,&k);printf("%d%d%d\n",i,j,k);
}


```
I actually tried it and the number is 10300.
How did you get this number? Thank you.

This post is from Talking

Latest reply

%d%*d%d is wrong. The correct answer should be %d%d%d. This problem occurs because of this error.  Details Published on 2024-9-9 14:12
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

1400

Posts

0

Resources
2
 

Eight-part essay again

This post is from Talking
Personal signature

执古之道,以御今之有,能知古始,是谓道纪

 
 
 

25

Posts

2

Resources
3
 

%*d is equivalent to skipping, so 10 is input to a, 20 is skipped, 30 is input to b, and then there is no input. c is defined as 0 at the beginning, so finally a=10, b=30, c=0 is output

This post is from Talking

Comments

Thank you, that's exactly what happened  Details Published on 2024-9-5 09:41
 
 
 

3181

Posts

0

Resources
4
 
FuShenxiao posted on 2024-9-5 09:36 %*d is equivalent to skipping, so 10 is input to a, 20 is skipped when input, 30 is input to b, and then there is no input. c is defined as 0 at the beginning, so the most...

Thank you, that's exactly what happened

This post is from Talking
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 
 

1111

Posts

1

Resources
5
 

Poster c is still in its infancy... Come on!

This post is from Talking
 
 
 

185

Posts

0

Resources
6
 
%d%*d%d is wrong. The correct answer should be %d%d%d. This problem occurs because of this error.
This post is from Talking
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
Inductor and transformer testing methods and experience

3. Inductor and transformer detection methods and experience 1. Detection of color-coded inductors Set the multimeter to ...

Motor drive control essence summary post

Since the establishment of this board, many netizens have posted many very valuable posts here. Xiaoguan took advantage ...

The relationship between FPGA memories

The relationship between FPGA memories

Has this condition reached the level of shock (moderate)?

My family member was stabbed twice: once in the head and once in the left hand. At that time, the treatment in the emer ...

【i.MX6ULL】Driver Development——by DDZZ669

@DDZZ669 【i.MX6ULL】Driver Development 1——Character Device Development Template 【i.MX6ULL】Driver Development 2——N ...

Oscilloscope AC coupling will have DC bias

I used an oscilloscope's AC coupling to test a high-voltage power supply with an output of 1KV, but the oscilloscope sho ...

View Circuit-ADC and System (2)

View Circuit-ADC and System (2) Full scale error Full scale error Full scale error refers to the difference between the ...

Why are exceptions and interrupts designed so complicated? - Reading notes on "RISC-V Architecture Programming and Practice"

This post was last edited by jobszheng5 on 2023-5-11 15:13 In the ARM company's RISC instruction set Cortex-M3 series ...

Ask about analog switch selection

For this kind of two-port network for measuring capacitance, with an accuracy level of pF, I would like to ask, how shou ...

【Jiangxinchuang D133CBS】D133CBS first experience

1 Introduction to D133CBV-QFN88-V1-2 Development Board D133CBV-QFN88-V1-2 is a human-computer interaction application d ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list