Question

Please help me out with all the question. I really need help with all please help

i will surely give you thumbs up please with correct answer

Question 1 (1 point) Saved Which identifier name below is illegal in C? |_10C 10C C10 All of them is legalQuestion 2 (1 point) You have the declaration as below int a = 0; Which line below will give you a warning when compiling? prQuestion 3 (1 point) Which line below is equivalent to System.out.println(Hello World”); in Java? printf(Hello World\n); pQuestion 4 (1 point) Suppose we have the code below int a= 1, b = 0; double c = 2.1, d = 3.3; a = c + d; printf(%d, a); WhaQuestion 5 (1 point) Suppose we have the code below int a= 1, b = 0; double c = 2.1, d = 3.3; a = c + d; printf(%f, a); Wha

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) 10C

Identifiers are nothing but names of variables,functions,arrays,structure etc.The first character of an indetifier should be either alphabet or underscore.It should not begin with any numerical digit.Hence 10C is illegal identifier since it begins with number while other two identifiers begin with alphabet and underscore.

2)printf("%f",a);

Above option will thrown a warning since it expects argument of type 'double' but a is of type int.

printf("%x",a) this will output lowercase hexadecimal number without any warnings

printf("%o",a) this will output octal number without any warnings

3)printf("Hello World\n");

System.out.println("Hello World") prints Hello World in a new line , we can achieve similar output by using '\n' in printf.

4)output : 5

a is declared as int so after adding c and d result is 5.4 which will be stored in int data type i.e. 5

Hence printf("%d",a) will format a in int and print 5

5)output : A meaningless number

since printf("%f",a) expects argument of type double and a is of type int.The compiler do not automatically cast your int to float

Add a comment
Know the answer?
Add Answer to:
Please help me out with all the question. I really need help with all please help...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hey, I really need help understanding the math get the answer that is given. Please help....

    Hey, I really need help understanding the math get the answer that is given. Please help. Thanks in advance. for (int k =0; k s Ign; k++) {for (int i =0; is n2; i++) Print “Hello World"; for (int j =0; j s n; j++) Print “Hello World"; } When n = 2, how many times will “Hello World” be printed?16 When n =4, how many times will “Hello World” be printed? 66 Assuming that the print is the basic...

  • Hello, I need help with the following C code. This program asks the user to enter...

    Hello, I need help with the following C code. This program asks the user to enter three numbers and outputs the sum on the screen , all im trying to do is have the program reprompt the user for a number if anything other than a number is entered for each of the entries. I wanted to use do while for each of the functions but that did not work for example: Enter Number 1: 2 Enter Number 2: Hello...

  • Hello all, I need an expert in organic chemistry to help with this practice question. Please...

    Hello all, I need an expert in organic chemistry to help with this practice question. Please give answer the question below. Please explain your answers for each drug separately. Please I need your honest answer to this question. Thank you. The question is as stated below; Hello all, I need an expert in organic chemistry to help with this practice question. Please give answer the question below. Please explain your answers for each drug separately. Please I need your honest...

  • How many times does the message, “Hello” get printed out by the code segment below? int...

    How many times does the message, “Hello” get printed out by the code segment below? int count = 0; while (count < 41) {     printf(“Hello\n”);     count = count+3; } D Question 2 1 pts How many times does the message, "Hello" get printed out by the code segment below? int count = 0; while (count < 41) printf("Helloln"); count count+3;

  • C++ HELP I need help with this program. I have done and compiled this program in...

    C++ HELP I need help with this program. I have done and compiled this program in a single file called bill.cpp. It works fine. I am using printf and scanf. Instead of printf and scanf use cin and cout to make the program run. after this please split this program in three files 1. bill.h = contains the class program with methods and variables eg of class file class bill { } 2. bill.cpp = contains the functions from class...

  • CSC331: Data Structures NOTE: Please read the instructions carefully. If you do not understand please do...

    CSC331: Data Structures NOTE: Please read the instructions carefully. If you do not understand please do not attempt to answer the question. This is Data Structure. The question is not asking to write a C++, the C++ code is already provided. The question is asking to use COMMAND PROMPT find the cpp file where the code is written, display the message “Hello World!” through COMMAND PROMPT. Then using COMMAND PROMPT to also output the message “Hello World!” into a text...

  • Please help me with this question (in C programming language and Unix) computer system book 3 edi...

    please help me with this question (in C programming language and Unix) computer system book 3 edition int *fun (int *x)f int value *xtt return &value; int main) int pl; int **p2; int a; char str [5] printf ("Enter a number:") scanf("%d", a) ; printf ("Enter a line:") gets (str); p1-malloc(sizeof (int)) *pl-p2; p2-malloc(sizeof (int)); pl-fun (a); n-0; for (pl-stripl<-str+5;pl++) if (isdigit (pl)) at+; return 0; Construct a table that shows for each line of code, what may be the...

  • C++ HELP I need help with this program. I have done and compiled this program in a single file called bill.cpp. It works fine. But I need to split this program in three files 1. bill.h = contains the...

    C++ HELP I need help with this program. I have done and compiled this program in a single file called bill.cpp. It works fine. But I need to split this program in three files 1. bill.h = contains the class program with methods and variables 2. bill.cpp = contains the functions from class file 3. main.cpp = contains the main program. Please split this program into three files and make the program run. I have posted the code here. #include<iostream>...

  • Linux & C code help with creating a child process and kills itself with SIGNAL. I...

    Linux & C code help with creating a child process and kills itself with SIGNAL. I provided most of the code, I need some help to finish. Please provide output screen shot as well. Thank you! A Process creates a child process. Child process will print out "hello 0" "hello 1" ..... 1 line per second. After a certain number of seconds(user input), it kills itself WITH signal mechanism ONLY, don't use exit() on the child. You can use alarm()...

  • Please help me debug the following code #include int main(void){ int a = 11, b =...

    Please help me debug the following code #include int main(void){ int a = 11, b = 5; int *ptr1 = &a, *ptr2 = &b; printf("%d %d\n", *ptr1, *ptr2); swap(&ptr1, &ptr2); printf("%d %d\n", *ptr1, *ptr2); minimum(ptr1, ptr2); printf("%d %d\n", a, b); return 0; } // Part A void swap(int **ptr1, int **ptr2){ int *temp = *ptr1; *ptr1 = *ptr2; *ptr2 = temp; return; } // Part B void minimum(int *ptr1, int *ptr2){ if(*ptr1 > *ptr2){ *ptr1 = *ptr2; }else{ *ptr2 =...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT