ibm
Programming and Technical
Programming
Program
Wap to find a desired char in the string and print its ASCII value...Be perfect with String methods
Read Solution (Total 15)
-
- import java.util.Scanner;
public class HelloWorld{
public static void main(String []args){
Scanner sc=new Scanner(System.in);
char ch = sc.next().charAt(0);
int ascii = (int) ch;
System.out.println(ascii);
}
} - 6 years agoHelpfull: Yes(3) No(0)
- Can u share it experience???What program have asked in coding round?
For all of them are same question or different?? - 7 years agoHelpfull: Yes(2) No(0)
- #include
int main()
{
char c;
printf("enter a character:");
scanf("%c", &c);
printf("ASCII value of %c=%d", c,c);
return 0;
} - 7 years agoHelpfull: Yes(2) No(0)
- char character = 'a';
int ascii = (int) character; - 7 years agoHelpfull: Yes(1) No(0)
- import java.lang.*;
import java.util.Scanner;
class ExAscii
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
String a;
System.out.println("Enter the String");
a=in.nextLine();
int b=a.length();
System.out.println("Enter the whoses ASCII value you want:");
char x=in.next().charAt(0);
int count=0;
for(int i=0;i - 6 years agoHelpfull: Yes(1) No(0)
- Request u to write the coding
And tell about the selection procedure - 7 years agoHelpfull: Yes(0) No(0)
- First what are the rounds will be there??
First itself coding or number Series??? - 7 years agoHelpfull: Yes(0) No(0)
- public class Lastbetword {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
System.out.println("enter a string");
String ch=scan.next();
int n=ch.length();
char []arr=ch.toCharArray();
char []arr1=new char[n];
int l=arr.length;
char c;
for(char i=0;i - 7 years agoHelpfull: Yes(0) No(3)
- please share series question also
- 7 years agoHelpfull: Yes(0) No(0)
- Can we use scanner class in program???????
- 7 years agoHelpfull: Yes(0) No(0)
- void main(){
char a[10],search_char;
int i;
for(i=0;i !=" ";i++)
if(a[i]==search_char)
{printf("the character ascii value is ==%d",a[i]);
}} - 7 years agoHelpfull: Yes(0) No(0)
- #include
int main()
{
char c;
printf("Enter a character: ");
// Reads character input from the user
scanf("%c", &c);
// %d displays the integer value of a character
// %c displays the actual character
printf("ASCII value of %c = %d", c, c);
return 0;
} - 7 years agoHelpfull: Yes(0) No(0)
- import java.io.*;
import java.util.*;
class NewAsc
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int count=0;
System.out.println("Enter any string: ");
String s=sc.nextLine();
char[] ch=s.toCharArray();
System.out.println("Enter any character from the string whose ascii value you want to know: ");
char c=sc.next().charAt(0);
for(int i=0;i - 6 years agoHelpfull: Yes(0) No(0)
- public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String str1=sc.next();
int flag=0;
str2=str1.toLowerCase();
char key=sc.next().charAt(0);
for(int i=0;i - 6 years agoHelpfull: Yes(0) No(0)
- import java.util.*;
class Ascii
{
public static void main(String args[])
{
Scanner sc= new Scanner(System.in);
char ch= sc.next().charAt(0);
int a=(int)ch;
System.out.println(a);
}
} - 6 years agoHelpfull: Yes(0) No(0)
ibm Other Question