answersLogoWhite

0

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

7y ago

What else can I help you with?

Continue Learning about Engineering

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; }


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(); }


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(); }


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.


What to do to write a c program to input a number then a digit and findout the place value of that digit?

#include<stdio.h> int main() { int d,j=1,i,flag=0,count=0,k=0; int b[]; char a[],c; printf("enter the number="); scanf("%s",a); printf("enter the digit="); scanf("%c",&c); printf("the place value of given digit is:"); for(i=0;a[i]!='\0';i++) { if(a[i]==c) { b[k]==a[i]-'0'; b[k]=b[k]=*j; flag=1; count++; k++; } j=j*10; } if(flag==1) { printf("the place value of given digit %c is:",c); for(i=0;i<count;i++) printf("\n%d",b[i]); } else printf("your entered digit is not present in number"); return 0; }

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; } } }


What is mode on a calculator?

On many calculators, the MODE key/button is to set the calculator into degrees or radian angle measurment, that is, when you enter a value, it and all further values you enter will then either be understood by the calculator as a degrees or radian value for an angle.


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"


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.