C | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

C

C program for name of item,price quantity

28th Jun 2022, 6:53 AM
S.vaishnavi
S.vaishnavi  - avatar
7 Answers
+ 2
Attempts?
28th Jun 2022, 8:04 AM
A͢J
A͢J - avatar
+ 1
S.vaishnavi Her means try to write code and show attempts.
28th Jun 2022, 4:50 PM
A͢J
A͢J - avatar
+ 1
S.vaishnavi you can not store name in a single character, use char array to hold the name. Like char name[50]; scanf ("%s",&name);
29th Jun 2022, 4:40 AM
Rupali Haldiya
Rupali Haldiya - avatar
0
No
28th Jun 2022, 9:57 AM
S.vaishnavi
S.vaishnavi  - avatar
0
S.vaishnavi please try at least
28th Jun 2022, 12:59 PM
Rupali Haldiya
Rupali Haldiya - avatar
0
What do you mean
28th Jun 2022, 4:04 PM
S.vaishnavi
S.vaishnavi  - avatar
0
#include <stdio.h> void main() { char name; int price, quantity; printf("enter name of item\n"); scanf("%c",&name); printf("price\n"); scanf("%d",&price); printf("quantity"); scanf("%d",&quantity); return 0; }
29th Jun 2022, 2:39 AM
S.vaishnavi
S.vaishnavi  - avatar