Which of the following declares correctly a pointer to a character char * n; int ch *; O *ch = n; char &ch; O Other:
Q: 3. Write a program to count the number of occurrences of any two vowels in succession in a line of…
A: Actually, program is an executable software that runs on a computer.
Q: 10. Which is correct with respect to the size of the data types? a) char > int float c) char < int…
A: Given: 10. Which is correct with respect to the size of the data types?a) char > int < floatb)…
Q: Write a program to perform the following function: • Ask users to enter weight and height • Display…
A: Your C program is given below as you required with an output.
Q: QUESTION 5 What number does val store at the end of the following code snippet? data = [85 64 128…
A: Question (6) given - A MATLAB code snippet is given. What number does the variable val is store at…
Q: Which one of the following is an invalid example of char value in C++? * 'A' "B" '%' '2' The result…
A: C++: C++ is a general purpose programming language and is an extension of programming language C. It…
Q: 1) Which of the following assignment statements will cause errors. Copy and paste it in C++ editor…
A: The following assignment statements will cause errors, e = "h"; e = "def";
Q: What is the output of the following program segment? * c = putchar (c); putchar (F(c)); putchar (c);…
A: As per the requirement program is executed in c language. If we execute the same program as it is we…
Q: int a = -2; // a is stored at address 101 int b = 35; // b is stored at address 189 int *pl=sa; //…
A: int a = -2; int b = 35; int *p1 = &a; int *p2 = &b; int **pp = &p2; *p1 = *p2 + **pp;…
Q: #include using namespace std; void transaction(double&, double, char&, int); int main() { double…
A: Given C++ program contains a function transaction and many variables are initialised in this…
Q: Question 12: Which argument is optional for the HLOOKUP function? Answer: A. B. C. D. O Lookup value…
A: 1.) Range lookup It is an optional argument for the HLOOKUP function. If it is omitted then HLOOKUP…
Q: Which of the following explains functions overloading? Select one: int func (int); Oa. int func…
A: Actually, function is a group of statements.
Q: QUESTION 8 You can cast a character value to an int, or an int to char. O true O false QUESTION 9…
A: Question 8 Int to character can be casted using various methods and character to int can be casted…
Q: Q2: inf means infinity. Explain what is wrong with this code? name this kind of error and suggest…
A: That is happening because you have entered n=1 n-- will make value of n to 0. So r=1/0 is basically…
Q: The following program or program segment has errors. Find as many as you can. fstream…
A: Lets see the solution.
Q: * Which of the following declares correctly a pointer to a character *ch = n; O int ch *: O char *…
A: To create a pointer using * Data type followed by the * ending with the pointer variable name. int…
Q: Write a program that asks the user to enter 2 input numbers. Your program should compute and display…
A: Pointer definition: Variable is used to store the data values where a pointer is a special variable…
Q: Read the following function unsigned char PtrGame(void) { int varl; int * var2; unsigned char **…
A:
Q: Which of the following is false about Python? O Python is designed to be highly readable O Python…
A: In the first question, Python is a low-level language is the false option.
Q: See the declaration below: int* i = new int (7); What will be the result of the following…
A: The problem is based on the basics of pointers in programming languages like C,C++.
Q: In C++, using STL algorithms create a program that allows the user to search the text file for an…
A: Find the required code in C++ given as below and output :
Q: What will be the value stored in variables "num2" and "num3" after executing the following code…
A:
Q: Which of the following options correctly describes the result of the following C/C++ code? int a=6,…
A: Answer D. The value of variable a is changed to the value of variable b. #include <stdio.h>…
Q: 3- How many the number of errors in the following sub_program? Hincludeciostream.h> void main()…
A: Introduction of the Program: The C++ program takes semicolon in the for loop so in the for loop it…
Q: Which among the following function can be called without arguments? i) void add(int x, int y=0)…
A: A function can be called with out argument if function doesn't contains any argument . Or it…
Q: item. This operator can be used anywhere you can use an unsigned integer, including in mathematical…
A: Please find the answer below :
Q: • Create the following functions o void insert_begin) : inserts a o void insert end0: inserts a n •…
A: Program is written below for the given snippet.
Q: Vhich of the following declares correctly a pointer to a character O int ch *; char &ch; O *ch = n;…
A: It is defined as Pointers in C are easy and fun to learn. Some C programming tasks are performed…
Q: 1. Which is not an "unsignod" value of int type? A. 35 B.I C.-57 D.O E 124 2. Which statement about…
A:
Q: Which of the following statements that declares an array named ar of 22 components of type int and…
A: The name of the array is "ar". Hence among all the options, array without the name "ar" is…
Q: Which of the following declaration a correct declaration of a pointer of an integer constant data…
A:
Q: If X is a pointer of type float and holds the address of variable Y contains 15.0. Which of the…
A: The Pointer in C, is a variable that stores address of another variable. A pointer can also be used…
Q: In which of the following declarations can the identifier x be used as a pointer to a char? (choose…
A: Answer is : char *x; x is pointer to a char. x used to store address of the character variable.…
Q: Refer to the following code. Which line may be used to complete the code so it would not result to…
A: This question comes from Python Programming Language which is a paper of computer science. Let's…
Q: Which statement is for allocating single block of requested memory to integer pointer c? O int 'c -…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: What will be displayed by the following // value = ( 25), Address ( 1776) baz = foo; myvar foo; cout…
A: Given the value is 25 and address is 1776 baz= *foo // this will store the value in baz myvar=foo…
Q: Write a program to read and store four student’s 21SP registered course and their grade point, sort…
A: Problem: To read and store four student’s 21SP registered course and their grade point sort them…
Q: the user to enter two integer pointers th
A: Q. Write a program that prompt the user to enter two integer pointers that are 8 and 2,then…
Q: 1. Which is not an "unsigned" value of int type A. 35 B.I C. -57 D.0 E 124 2. Which statement about…
A: According to Bartleby Guidelines we should answer only one question so i will answer question 1 in…
Q: The following program or program segment has errors. Find as many as you can. fstream…
A: Given: The following program or program segment has errors. Find as many as you can. fstream…
Q: Can this please be converted into a C code? #include using namespace std; int main() { char…
A: Solution is given below :
Q: Determine what will be printed from each output of statement of this code below: #include using…
A: #include <iostream> using namespace std; int main() { int apple;//varaible declaration int…
Q: Given the following declaration : char msg[100] = "Department of Computer Science"; What is…
A: strcpy_s function copies the contents in the address of src. and strlen function is used to find the…
Q: In which memory segments are the variables in the following code located? int i = 0; void…
A: We have a memory layout like below
Q: The following program or program segment has errors. Find as many as you can. fstream…
A: Given: The following program or program segment has errors. Find as many as you can. fstream…
Q: The correct with respect to the size of the data types? a) char > int float c) char < int < float…
A: Below is the correct answer:
Q: Write a program that asks the user to enter three values the program then calculates the average of…
A: Passing by reference means the parameter of the calling function will be the same as the passed…
Q: Which of the following statements de-allocates a dynamic array "Marks" of 10 float elements in a…
A: I have given the answer in step 2.
Q: 8. Which function is used to write a single character to console in C++? a) cout.put(ch) b)…
A: option B: incorrect as, cout.putline(ch) no suh function in c++ option C: incorrect as,…
Step by step
Solved in 2 steps
- Which of the following statement(s) are true for the above code? Group of answer choices the code allocates space for a local variable and a global array the code allocates space for a local variable and a local array The code utilizes the index register the code utilizes the stack pointer the code uses 5 different addressing modesThe following code DOES NOT STOP to request the value for lname or ID. What line of code could you include to ensure the user can enter the requested integer and line of text? Modify the code below. Place the line of code in the correct place to fix the problem. Note: remember the file read pointer. int choice; string lname, Id; cout << “Welcome to the student record search system” << endl; cout << "Please enter 1 to search by last name or 2 to search by ID " << endl; cin >> choice; if (choice == 1) { cout << “Please enter the last name “ << endl; getline(cin, lname); } else { cout << "Please enter the ID “ << endl; getline(cin, Id); }Which line of the below code segment(s) is the wrong syntax that will cause an compilation error (choose all that apply): #include <stdio.h> void main void() { { A: #include <stdio.h> B: void main void() C:The first { D:The second {
- Which of the following declaration a correct declaration of a pointer of an integer constant data called a ? Select one: a. const int *a; b. int const a; c. int * const a; d. const int a;The beginning of the code is given below. #include <stdio.h>#include <string.h> typedef struct{char firstname[20];unsigned height;unsigned weight;} Person; //You can use this functionvoid BufferCleaner(){ while(getchar()!='\n');} void FileCleaner(){FILE *fp; fp = fopen("data/14w_2.txt", "w");fprintf(fp,""); fclose(fp);}Which of the following statement is correct? Destructor destroys only float data members of the object. Destructor destroys the complete object. Destructor destroys only pointer data members of the object. Destructor destroys only integer data members of the object.
- Given string userString on one line, character newChar on a second line, and integer strIndex on a third line, change the character at index strIndex of userString to newChar. Ex: If the input is: garlic Z 0 then the output is: Zarlic Note: Assume the length of string userString is greater than strIndex. #include <iostream> #include <string> using namespace std; int main() { string userString; char newChar; int strIndex; getline(cin, userString); cin >> newChar; cin >> strIndex; /* Your code goes here */ cout << userString << endl; return 0; }Which of the following is a method for redefining a data type? union pointer struct typedefWhich of the following INT 33h functions shows and hides the mouse pointer?
- #include <iostream> #include<malloc.h> #include<fstream> #include<string.h> using namespace std;struct student {char name[30], id[10], addr[50], ph[15], dob[10], cls[5];struct student * next;};void addlist(struct student ** st, char name[], char id[], char addr[], char ph[], char dob[], char cls[]);struct student * search(struct student * st, char id[]);void delete1(struct student ** st, char id[]);void viewstudents(struct student * st);int main() {FILE * f;int ch, chh, flag = 1;char name[30], id[10], addr[50], ph[15], dob[10], cls[5];struct student * start, * sr;start = NULL;f = fopen("Student.txt", "a+"); while (!fscanf(f, "%s\t%s\t%s\t%s\t%s\t%s\n", name, id, addr, ph, dob, cls)) { addlist( & start, name, id, addr, ph, dob, cls);}cout << "Welcome to A* High School Students Management System.";while (flag) {cout << "\nPlease select your choice:\n1.Adding a new student record";cout << "\n2.Updating an existing student record\n3.Search a…The code you will need for this assignment is here (in C file) /* YOUR NAME HERE* CSCI 4100* Programming Assignment 2* The Nut Shell - a simple shell that executes commands*/ #include <stdio.h>#include <stddef.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <sys/types.h>#include <sys/wait.h>#include <unistd.h> #define MAX_LINE 256#define MAX_ARGS 64 int is_blank(const char *cmd);void parse_args(const char *cmd, char *argv[]);void read_line(char *line); int main(){/* YOUR CODE HERE */} /* Checks if a string contains only whitespace* str - the string to check* returns 1 if str contains whitespace, 0 otherwise*/int is_blank(const char *str){int i = 0;while(str[i] != '\0') {if(!isspace(str[i++]))return 0;}return 1;} /* Reads a line of text from the console* line - an allocated array of characters of size MAX_LINE* where the function can store all of the characters read.*/void read_line(char *line){char c;int chars_read =…Write a function called get_game_dict(csv file name ) that returns (not prints) a dictionary of all the game names in the csv file. The dictionary keys are the names of the games, and the corresponding values are the number of times that name appears as the name of game. there should be no extra whitespace characters at the beginning or end of the names.