scanf tag

16 questions


1 answers
428 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
76 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...

1 years ago

1 answers
83 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...

1 years ago

1 answers
82 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?

1 years ago

1 answers
90 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...

1 years ago

1 answers
131 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...

1 years ago

1 answers
91 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 ...

1 years ago

1 answers
123 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
60 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...

1 years ago

1 answers
129 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(...

1 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.