scanf ("%[^\n]s", sentence);
Chat with our AI personalities
#include,stdio.h>main(){char string1[20],string2[20]printf("enter the first string");scanf("%s",string1);// reading the string1printf("enter the second string");scanf("%s", string2);// reading the the string2printf( "the first string is %s",string1);// printing the string1printf("the second string is %s",string2);// printing the string2}the problem of using scanf is that it does not take space. so we can use gets for it.ie instead of scanf("%s",string1); we can use gets(string1); .
Accept means to take or receive something.Do you accept the charges made against you in this court today?You have a collect call from Mozambique, do you accept the charges?Press yes to accept this amount, or no to decline.I accept your point, but I still can't agree with you.
i want a coding of a program of a calculator using graphics in c language??
Usually by using the scanf function
The required c program is given below /*Swapping(interchange) the two entered numbers*/ #include<stdio.h> main() { /*Without using third variable*/ int a,b,t; printf("Enter a:"); scanf("%d",&a); printf("Enter b:"); scanf("%d",&b); a=a+b; b=a-b; a=a-b; printf("\n After swapping without using third variable"); printf("\na=%d\nb=%d",a,b); }