answersLogoWhite

0


Best Answer

The new line character ('\n') has the ASCII value 10 decimal, 0x0A hexadecimal. In some cases, a new line may be preceded with a carriage-return (ASCII 13 decimal, 0x0D hexadecimal), however the carriage return is only of relevance to line printers.

To determine when the enter key is pressed, capture the character via stdin and test for equality with the '\n' character.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is value of enter key then how to get that value in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write c program to find multiplication of three numbers?

#include<stdio.h> #include<conio.h> void main() { int a,b,c; int Result; printf("enter the value of a:"); scanf("%d", &a); printf("enter the value of b"); scanf("%d", &b); printf("enter the value of c"); scanf("%d", &c); Result=a*b*c; printf("%d", Result); getch(); }


What does c plus plus use call by value or call by reference?

When we call a function in C++ by passing the values as arguments, it is called call by value. e.g #include<iostream.h> #include<conio.h> int add(int,int); int main() { int a,b,c; cout<<"Enter numbers."; cin>>a>>b; c=add(a,b); cout<<"Sum : "<<c; return 0; } int add(int a,int b) { int c; c=a+b; return c; }


What is the C program to check whether a given character is vowel or not using if else?

#include<stdio.h> main() { char key; clrscr(); printf("Enter the key"); scanf("\n %c",& key); if (key>='A' key<='Z' )&&(key>='a' key<='z') { printf("%c is an character \n",key); } else { printf("%c is not character",key); } getch(); }


How do you write a program in C that variables change value with each other?

void main() { //variable declaration int a; int b; printf("\n Enter the first value"); scanf("%d",&a); printf("\n Enter the second value"); scanf("%d",&b); a=a+b; b=a-b; a=a-b; printf("\n After swap the value"); printf("\n value of A=%d",a); printf("\n value of A=%d",b); getch(); }


In C how can you make a program that allowing the user press a key then process without pressing Enter key use getch but how?

How can I program that when the user press a key, it will automatically process like 4 example:The user press wYou just press the key 'w'Not scanf...I think it's getch but I don't know how. It have errors.

Related questions

How do you find the greatest of three numbers using vb script?

dim a,b,c a=cint(inputbox("enter value for a")) b=cint(inputbox("enter value for b")) c=cint(inputbox("enter value for c")) if((a>b)and(a>c)) then msgbox "greatest number is a="&a else if ((b>a)and(b>c)) then msgbox "greatest number is b="&b else msgbox "greatest number is c="&c end if end if


What consists of text that you type until you press the ENTER key?

Formulas display as text while you are entering them in a cell. They display a calculated value after you press the ENTER key. For example, you can type =8+2 in a cell and when you press ENTER, the cell will display the value 10.


How do you write an exponent on a calculator?

enter a value "x", press the "^" key, then enter the value you want to raise "x" to, "y". the calculator should show X^Y, for whatever you substituted. hit enter.


How do you talk in multiplayer in WolfQuest?

click the "c" key on the keyboard and type what you want to say. when finished you click the enter key to send it


Write a c program to enter five different values in any array and find out valve by location and location by value?

//Made for 5 inputs THIS PROGRAM IS NOT COMPILED OR CHECKED SO PLEASE DO SO#include#includevoid main(){int arr[5], i,c,val;clrscr();for(i = 0; i


Unix shell program to find the roots of a quadratic equation?

echo "Enter a value: " read a echo "Enter a value: " read b echo "Enter a value: " read c x1= echo "scale=7; (-$b+sqrt($b^2-4*$a*$c))/(2*$a)"|bc' x2= echo "scale=7; (-$b-sqrt($b^2-4*$a*$c))/(2*$a)"|bc' echo $x1 echo $x2


How do you use turbos in tron?

use the enter key


How do you enter the number divided by -11?

enter 11 change to -11 by hitting the +/- key MS (save in memory) cancel (C) enter the number you want divided / (divide by) MR (memory recall) =


Write algorithm to find middle number in three numbers?

#include<iostream.h> #include<conio.h> void main() { int a,b,c; cout<<"enter the value of a"<<endl; cin>>a; cout<<"enter the value of b"<<endl; cin>>b; cout<<"enter the value of c"<<endl; cin>>c; if(a>b) { if(b>c) { cout<<"the middle number is b:"<<endl; } else { if(a>c) { cout<<"the middle is c:"<<endl; } else { cout<<"the middle number is b:"<<endl; } } if(a<b) { if(b<c) { cout<<"the middle number is b:"<<endl; } else { if(a<c) { cout<<"the middle number is c:"<<endl; } else { cout<<"the middle number is a:"<<endl; } } }


Keyboard shortcut for copy?

Copy:Ctrl+C in Windows (meaning "press CTRL key and C key simultaneously")Cmd+C on Mac OS XOn Linux, it varies with the program.Paste:Ctrl+V in WindowsCmd+V on Mac


What keys do you press to do absolute value on computer?

Absolute value is found simply by removing any positive or negative sign. It is signified by use of the vertical bar on both sides of the object. e.g. the absolute value of abc is |abc|. The key is normally found above the 'Enter' key, and shares the key with the backslash.


How do you type out the absolute value brackets on a computer keyboard what do I push?

hold shift and cpress the button above the "Enter key"