Question

In: Computer Science

Write one difference for items below a.     char versus Character b.     Source code versus Byte code c.    Complier error...

Write one difference for items below

a.     char versus Character

b.     Source code versus Byte code

c.    Complier error versus Runtime error

d.   char [ ] versus String [ ]

Solutions

Expert Solution

a. char is a primitive type that represents a single 16 bit Unicode character while Character is a wrapper class that allows us to use char primitive concept in OOP-kind of way.

b.Source code refers to the high-level code or assembly code that is generated by a human/programmer. So the statements written in any programming language is termed as source code. ... Byte code is an intermediate code between the source code and machine code.

c.Compile-time errors are generally referred to the error corresponding to syntax or semantics. Runtime errors on the other hand refer to the error encountered during the execution of code at runtime

d.Char is a single alphabet where as String is a sequence of characters. Char is primitive datatype where as String is a class. A char holds a single character, while a string holds lots of characters.

Any queries just comment

Give thumbsup

Thank you and all the best


Related Solutions

Write in C programming language Write the function replace(char b[], char f[], char t[]). which finds...
Write in C programming language Write the function replace(char b[], char f[], char t[]). which finds the string 'f' in the string 'b' and replaces it with the string 't'. You can assume that f and t same length Example: char string[] = "zap";     replace(string, "ap", "oo"); --changes 'string' to "zoo".     *don't assume substring being replaced is singular, or that its own substrings are unique.     *Don't re scan letters already checked and replaced         char string[] =...
How do I write a C# and a C++ code for creating a character array containing...
How do I write a C# and a C++ code for creating a character array containing the characters 'p', 'i', 'n','e','P','I','N','E' only and then using these lower and capital case letter character generate all possible combinations like PInE or PinE or PIne or PINE or piNE etc. and only in this order so if this order is created eg. NeIP or EnPi or NeIP or IPnE and on. You can generate all the combinations randomly by creating the word pine...
Write source code in C to simulate the contiguous file allocation with the following conditions: •...
Write source code in C to simulate the contiguous file allocation with the following conditions: • Prompt the user to ender the no of files • Enter the name of the file • Enter the Starting block number • Enter no of block occupied by the file i.Condition: No two files must have the same block(if the user enter the same block no present in the previous file prompt the user “Block already in use”) #include<stdio.h> #include<conio.h> struct {    ...
Write the Java source code necessary to build a solution for the problem below: Create a...
Write the Java source code necessary to build a solution for the problem below: Create a MyLinkedList class. Create methods in the class to add an item to the head, tail, or middle of a linked list; remove an item from the head, tail, or middle of a linked list; check the size of the list; and search for an element in the list. Create a test class to use the newly created MyLinkedList class. Add the following names in...
Write the Java source code necessary to build a solution for the problem below: Create a...
Write the Java source code necessary to build a solution for the problem below: Create a MyLinkedList class. Create methods in the class to add an item to the head, tail, or middle of a linked list; remove an item from the head, tail, or middle of a linked list; check the size of the list; and search for an element in the list. Create a test class to use the newly created MyLinkedList class. Add the following names in...
Write the Java source code necessary to build a solution for the problem below: The Fibonacci...
Write the Java source code necessary to build a solution for the problem below: The Fibonacci numbers form a sequence where each number is the sum of the previous two numbers. Starting from 0 and 1, the first eight Fibonacci numbers are built in the following list using the equation Fn = Fn-1 + Fn-2: 0, 0 0, 1 1, 1 1, 2 2, 3 3, 5 5, 8 8, 13 The sequence would be the numbers in red (0,...
Programming in C language (not C++) Write a function definition called PhoneType that takes one character...
Programming in C language (not C++) Write a function definition called PhoneType that takes one character argument/ parameter called "phone" and returns a double. When the variable argument phone contains the caracter a or A, print the word Apple and return 1099.99. When phone contains the caracter s or S print the word Samsung and return 999.99. When phone contains anything else, return 0.0.
Please write the code in c++ Write a function with one input parameter that is a...
Please write the code in c++ Write a function with one input parameter that is a vector of strings. The function should count and return the number of strings in the vector that have either an 'x' or a 'z' character in them. For example, when the function is called, if the vector argument contains the 6 string values, "enter", "exit", "zebra", "tiger", "pizza", "zootaxy" the function should return a count of 4. ("exit", "zebra", "pizza", and "zootaxy" all have...
Write an x86 assembly language program that performs equivalently to the C++ source code file shown...
Write an x86 assembly language program that performs equivalently to the C++ source code file shown below.Please note that commented out behavior must be implemented in x86 assembly language. There is no standard, portable way to perform some of these actions in C++. #include void main() { // Use registers for these in your x86 assembly language program // Only use the .data segment for string (character array) variables int eax; int esi; int ecx; int edi; // Loop the...
Using c# , Write a program using a switch statement that takes one character value from...
Using c# , Write a program using a switch statement that takes one character value from the user and checks whether the entered value is an arithmetic operator (+, -, * , /) If not the program display a message that it not of the operators ( (+, -, * , /) .
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT