scanf tag

16 questions


1 answers
440 views
0
I keep getting errors in my input in scanf_s, how do I fix it?

char name[256]; printf(What's your name? ); scanf_s(%s, name,sizeof(name)); runs properly, but displays c4477,c6328 errorSo, char name[256]; printf(What's your name? ); scanf_s(%s, name,(unsigned cha...

1 years ago

1 answers
83 views
0
I don't know exactly why I use %lf when I input real numbers in the scanf function.

I heard that if you receive a real data value from the scanf function, the data type of the factor value is automatically changed from float type to double type, so in that way, the int type data valu...

2 years ago

1 answers
99 views
0
Hello! I want to know why infinite loops occur.

Hello!I fell into an infinite loop while practicing c, but I can't solve it.Here's the situation.If you receive an integer between 1 and 10, you have to exit the for statement and re-enter it when you...

2 years ago

1 answers
90 views
0
What do you mean by scanf in this while statement is 3?

while(scanf(%d %s %s, &s[n].id,s[n].name,s[n].major)==3) n++;What do you mean 3?

2 years ago

1 answers
98 views
0
I have a question about c language scanf %c, literal!

#include <stdio.h>int main(){ char str[] = hello; scanf(%c, str[0]); return; }This code is failing. hello is literal and cannot be accessed, but I want to change the information of str by saving...

2 years ago

1 answers
147 views
0
C Language Problem Questions

Write a program that receives random characters and outputs them repeatedly.However, if you enter (Q), the program ends.Enter one character: ACharacters entered: AEnter one character: dCharacters ente...

2 years ago

1 answers
103 views
0
cEnter language multi-character scanf_s

You do not enter it as a string, but as a character.But char a; scanf_s(%c, &a); printf(%c, a);If I do this, there is no error. char a, b; scanf_s(%c%c, &a, &b); printf(%c%c, a, b);This ...

2 years ago

1 answers
143 views
0
When the door turns weird, scanf

#include <stdio.h>#include <stdlib.h>#defineMAX_STACK_SIZE 100 // Declare Global Variableschar stack[MAX_STACK_SIZE];int top = -1; void stackFull() { fprintf(stderr, Stack is full, cannot...


1 answers
67 views
0
Enter numeric data using a for statement in the C language string

I'm a beginner in C language.You want to store data in each string from a string through an array and output it.You want to enter each branch's revenue into an array and calculate the total and averag...

2 years ago

1 answers
141 views
0
The program that you enter in the do while statement, it works once, but then it's weird.

#include <stdio.h>int main(void){ char ch; int x, y; int result; printf(*****************\n); printf(A--- Add\n); printf(S--- Subtract\n); printf(M--- Multiply\n); printf(D--- Divide\n); printf(...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.