Search
 
SCRIPT & CODE EXAMPLE
 

C

input in c

Integer: 
    scanf("%d", &intVariable); 
    printf("%d", intVariable);
  
Float: 
	scanf("%f", &floatVariable); 
	printf("%f", floatVariable);
  
Character: 
	scanf("%c", &charVariable); 
  	printf("%c", charVariable);

Word:
	scanf("%s", &strVariable)
    printf("%s" , strVariable)
    
Sentence:
	scanf(" %[^
]s", &strVariable); // in same line
	scanf("%[^
]s", &strVariable); // with new line
   	printf("%s", strVariable)
Comment

Syntax To Take Input In C

Integer: Input: scanf("%d", &intVariable); Output: printf("%d", intVariable);
Float: Input: scanf("%f", &floatVariable); Output: printf("%f", floatVariable);
Character: Input: scanf("%c", &charVariable); Output: printf("%c", charVariable);
Comment

how to take input in C

scanf("%d", &var);
Comment

PREVIOUS NEXT
Code Example
C :: libdvd-pkg: `apt-get check` failed 
C :: write a program in c to check whether the number is armstrong or not 
C :: get current used proxy windows 7 
C :: que es % en c 
C :: remove first character from string c 
C :: c iterate string 
C :: servo motor arduino 
C :: nested switch case in c 
C :: matplotlib plot circle marker 
C :: stdio 
C :: write a binary file c 
C :: take long long input in c 
C :: Array Input/Output in C 
C :: how to scanf two dimensional array in c 
C :: int_min in c 
C :: Convert mpg / mp4 to gif with ffmpeg 
C :: c fopen 
C :: Write a C program to merge two array to third array. 
C :: c check first character of string 
C :: malloc contiguous 2d array 
C :: c check if character is a space 
C :: read file c 
C :: turn a char array into double C 
C :: how to run c program from visual studio terminal 
C :: c strcmp 
C :: create arrya of chars malloc 
C :: virtualbox how to move vmdk to another folder 
C :: c function definition 
C :: owasp 
C :: arduino internal pull up resistor 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =