✅Author Profile: Hello everyone I am Ma Serati, CSDN blog expert 🥇🥇🥇🥇
📃Personal Homepage:Personal homepage
🔥Series Columns:200 C language test questions
1. General catalog of C language questions
- C language test 1 calculates and outputs the sum of the reciprocals of all natural numbers that can be divisible by 5 or 9 within n (including n)
- Calculate and output the following polynomial value s=1+1/(1+2)+1/(1+2+3)+..1/(1+2+3…+50)
- Calculation and output of C language test question 3 and s=1+(1+2^(0.5))+(1+2^(0.5)+3^(0.5))+…+(1+2^(0.5)+3^(0.5)+…+n^(0.5)))
- Calculate the C test question 4 and output the sum of the square roots of all prime numbers between 3 and n
- Calculate and output the sum of the square roots of the average value of each adjacent two elements in a given array (length is 9).
- C language test six: Make no more than n leading * signs in the string; if more than n, delete more than * signs; if less than n or equal to n, do nothing. The * number in the middle and end of the string is not deleted.
- C Language Test Question 7: Delete all the leading * signs in the function string, and the middle and tail * signs are not deleted.
- The following series sum is calculated in the C language test eight. The sum value is returned from the function value S=1+x+x^2/2! + x^3/3!+…x^n/n!
- C language test question nine = (ln(1)+ln(2)+ln(3)+…+ln(m))^0.5, s is returned as function value
- C language test ten: merge two positive integers ab with two digits to form an integer and put it in c. The way to merge is: put the ten and single digits of number a in turn on the ten and thousand digits of number c in turn, and the ten and single digits of number b in turn on the single and hundreds digits of number c in turn.
- Calculate and output the following polynomial values in C language test 11: sn=(1-1/2)+(1/3-1/4)+…+(1/(2n-1)1/2n).
- The scores of the C language test questions: m are stored in the score array. Please write a function fun. Its function is: return the person below the average score as the function value, and put the score below the average score in the function specified below.
- In C language test 13, find all the books that can be divided by 7 or 11 from 1 to 100, but cannot be divided by 7 and 11 at the same time, and place them in the array referred to by a, and return the number of these numbers through n.
- C language test 14: Make the leading * signs of a string not exceed n; if there are more than n, delete more than * signs; if there are less than n, do nothing. The * number in the middle and end of the string is not deleted.
- C language test 15 write function void function(int x,int pp[],int *n), find each integer that can divisible x and is not even, and place it in the array pointed by pp in order from small to large. The number of these divisors is returned by the formal parameter n
- C Language Test Question 16: Write to delete the characters specified in the subscript in the string. Among them, a points to the original string, the deleted string is stored in the array pointed to by b, and n stores the specified subscript.
- C language test question 17 is used to find the subscript of the largest element of an array in the array and store it in the storage unit referred to by k.
- C language test 18 calculates s based on the following offensives, and the calculation result is returned as the function value; n is passed in through the formal parameters. S=1+1/(1+2)+1/(1+2+3)+….+1/(1+2+3+4+…+n)
- The C language test 19 is used to find the value of p based on the following formula, and the result is brought back by the function value. M and n are two positive integers, and m>n is required. p=m!/n!(m-n)!
- C language test 20 uses the following simple iteration method to find a real root of the equation cos(x)-x=0.
- The function of the two-dimensional array writing function of n×n in C test question 21 is to set all values in the lower left triangle element of the array to 0.
- The C language test 22 defines a 3×3 two-dimensional array and assigns values in the main function. The function function makes it possible to find the average value of the elements around the array and return it to s in the main function as the function value.
- C language test question 23: Write a function void function(int tt[m][n],int pp[n]), tt points to a two-dimensional function group with m rows and n columns, finds the smallest element in each column of the two-dimensional function group, and puts it into the one-dimensional array specified by pp in turn
- C language test 24: Write a function unsigned function (unsigned w), w makes an unsigned integer greater than 10. If w is an integer of n(n≥2) bits, then the function finds the n-1 bits after w as the function value to return.
- C language test 25 write a function float function (double h). The function of the function keeps 2 decimal places for the value in the variable h and rounds the third digit (specify the positive number of the value in h).
- In the C language test question 26, please write a function function (char *s), which inverts the function's work in the string.
- In the C language test question 27, please write a program to realize the transpose of the matrix (3 rows and 3 columns) (i.e., rows and columns interchange).
- The function function of C language test question 28 is: delete the specified characters from the characters, and the upper and lowercase characters of the same letter are processed according to different characters.
- C language test question 29 write function int function (int lim,int aa[max]) to find all prime numbers less than or equal to lim and put them in aa array. The function returns the number of prime numbers to be found.
- In the C language test question 30, please write a function function to strings with 7 characters in length. Except for the beginning and end characters, arrange the remaining 5 characters in descending order of ascii code.
- C language test 31 determines whether the string is palindrome? If so, the function returns 1, and the output yes in the main function, otherwise 0, and the output no in the main function. Pastoral refers to strings where both the indirect reading and the inverted reading are the same.
- C language test question 32: Writing a function function, its function is: converting a string into an integer (the function provided by C language that converts a string into an integer must not be called).
- C language test question 33 compares the length of two strings (the function provided by C language to calculate the length of the string must not be called), and the function returns a longer string. If the two strings are the same length, the first string is returned.
- C language test question 34: Find all integers that can be divided into 1 to m (including m) and divisible 7 or 11 are placed in the array a, and the number of these numbers is returned through n.
- C language test question 35: Find the largest value and subscript in a one-dimensional integer array element, and the largest value and subscript it is located, and the largest value and subscript it is located are passed back through formal parameters. In the main function, x is the array name, n is the number of data in x, max stores the maximum value, and index stores the subscript of the element where the maximum value is located.
- C language test question 36 converts all letters in the string referred to by s with odd numbers to uppercase (if the position is not a letter, it will not be converted).
- C language test question 37: Find the value of the largest element in a 2×m integer two-dimensional array and return this value to the calling function.
- C language test question 38: except for the characters whose subscripts are even and ascii values are also even, the rest of the characters in the string are deleted; a new string formed by the remaining characters in the string is placed in an array pointed by t.
- In C language test question 39, in addition to the subscript of the string referred to by s, the ascii value is alsostrangeAll other characters except the number are deleted; a new string formed by the remaining characters in the string is placed in an array referred to by t.
- C language test forty: The * number at the end of the string should not be more than n; if there are more than n, then more than n numbers will be deleted; if there are less than or equal to n, then nothing will be done, and the * number in the middle and front of the string will not be deleted.
- In C language test question 41, please write a function to delete all spaces in a string.
- The C language test 42 assumes that the input string only contains letters and * numbers. Please write a function fun, its function is: move all the leading * signs in the string to the end of the string.
- In C language test question 43, find out the number of characters specified in the string referred to by ss and return this value.
- C language test question 44: Move the contents of a one-dimensional array. If n integers are included in the array, it is required to translate the array elements with subscripts from 0 to p (p is less than or equal to n-1) to the end of the array.
- C language test 45: Translate the first to p-th characters to the end of the string, and move the p+1 to the last character to the front of the string.
- C language test question 46: Put the character data in the two-dimensional array of m row n columns into a string in sequence in the order of columns.
- The C language test 47 program defines a two-dimensional array of N×M and automatically assigns values in the main function. Please write the function function(int a[N][M], int m), which is the function: multiply the value in the upper right triangle element of the array by m.
- C Language Test Question 48 This function can count the number of times a string of length 2 appears in another string.
- C language test question 49 only deletes the * number in the leading and tail of the string, and does not delete the * number between the letters in the string. n gives the length of the string, the number of leading * in the h string, and e gives the last * in the string
- In the C language test question fifty, please write a function void function (char *ss). Its function is: convert all letters in the string ss whose subscripts are odd positions to uppercase (if the position is not a letter, it will not be converted).
- The C language test question 51 is known to be a student record consisting of student ID and academic performance, and the data of n students has been stored in the s structure array. Please write a function fun. The function is: find the record of the student with the highest score and return the main function through the formal parameters (it is stipulated that there is only one highest score).
- The records of students in C language test 52 are divided into the student number and score group. The data obtained by n college students have been placed in the structure array a in the main function. Please write the function fun. Its function is: arrange the student's records according to the height of the score, with high scores ahead.
- C language test question 53: All non-prime numbers greater than 1 and less than integer m are stored in the array referred to by xx, and the numbers of non-prime numbers are passed back through k.
- The C language test question 54 finds the square root s of the sum of all natural numbers that can be divided by 3 and 7 within n (excluding n) and returns as function value.
- The scores of C language test questions are stored in the score array. Please write a function function. Its function is: return the number of people higher than the average score as the function value, and place the scores higher than the average score in the array specified by high.
- C test question 56 calculates and outputs the sum of all factors (excluding 1 and itself) of the given integer n. The value of n is not greater than 1000.
- The C language test question 57 assumes that the input string only contains letters and *. Please write a function function, its function is: delete all * numbers in the string. When writing functions, string functions provided by C must not be used.
- Please write a function fun in C language test question 58: calculate and output the following polynomial value (sn=1+1/1!+1/2!+1/3!+1/4!+…+1/n!)
- In the C language test question 59, please write a function fun. Its function is: find the smallest number greater than t in the fibonacci sequence, and the result is returned by the function.
- For the C language test questions 60, please write a function fun, calculate and output the sum of the following series: s=1/1*2+1/2*3+…+1/n(n+1)
- For C language test questions 61, please write a function fun: delete the characters subscripted as even numbers in the string pointed to by s, and form a new string to place it in the array indicated by t.
- C language test questions 62 Please write a function fun. Except for the * number leading and trailing of the string, delete all other * numbers in the string. The formal parameter h has pointed to the first letter of the string, and the formal parameter p has pointed to the last letter of the string. When writing programs, string functions provided by C language must not be used.
- For C language test questions 63, please write a function fun: delete the characters with an even number of ascii in the string referred to by s, and form a new string and place it in the array referred to by t.
- C language test questions 64, please write a function fun: Find the number of Pythagoreans
- C language test question Sixty-five, please write a function to realize the problem of monkey eating peaches
- C language test questions Sixty-six please write a function to achieve the sorting of three numbers from small to large
- C language test questions 67 Please write a function to implement the number of daffodils
- C language test questions 68: Please write a function to achieve intimate numbers
- C language test questions Sixty-nine Please write a function to determine whether a number is a prime number
- Please write a function to determine whether the year is a leap year in C language test
- In C language test question 71, please write a function to find the factorization of this number
- In C language test question 72, please write a function to determine the type of triangle and output its area and type.
- C language test question 73 Please write a function to find the greatest common divisor of two numbers
- C language test question 74 Please write a function to find the minimum common multiple of two numbers
- C language test question 75, please write a function to find the number of palindromes
- C language test question 76 Please write a letter to make a hundred dollars to buy a hundred chickens
- Question 77 of C language test questions please write a letter to realize the problem of fisherman fishing and drying the net
- C language test question 78 Please write a letter to find the greatest common divisor and the minimum common multiple of 2 numbers (transition and phase division)
- C language test question 79 Please write a function to achieve natural base e=2.718281828
- C Language Test Question 80 Statistical Word Number
- C language test question 81 uses recursive function call method to print the input 5 characters in reverse order
- In C language test question 82, enter lowercase letters and convert lowercase letters into uppercase letters.
- C language test question 83 output lower left triangle multiplication table
- C language test question 84: Find the distance between two points in space
- C language test question 85: Wolf chasing rabbit problem
- C Language Test Question 86: The Problem of Rabbit Birth
- C language test question 87: Implementation of selection sorting algorithm
- C language test questions 88: Implementing bubble sorting algorithm
- Implementing the insertion sorting algorithm for C test questions 89
- In C language ninety-three, enter a character x and find the position of the same letter in the input sentence (string).
- C Language Ninety-Five Implementing Classic Inversion Array (through pointer or array subscript operation)
- C Language Ninety-Six Implements Classic String Inversion (through pointers or subscript operations)
- In C language ninety-four, please write the function fun(char *str, int n), which is: to make the leading * signs of the string str not have n extra n. If there are more than n, delete the extra * signs. If there are less than or equal to n, then do not process it.
- C language test question 92 has multiple lines of input data. The first line is an integer n, which represents the number of test cases, followed by n lines. Each line includes a string composed of letters and numbers.
- In C language test question 91, write a program, use the formula π/4=1-1/3+1/5-1/7+... to find the approximate value of π until the absolute value of the last term is less than 10^-8.
- In C language test 90, enter one line of characters, and count the number of English letters, spaces, numbers and other characters respectively.
- C language test question 98: The bonuses issued by the enterprise are based on profit commission. When the profit (I) is less than or equal to RMB 100,000, the bonus can be increased by 10%; when the profit is higher than RMB 100,000 and less than RMB 200,000, the part below RMB 100,000 will be charged a 10% commission, and if the profit is higher than RMB 100,000, the part below RMB 100,000 will be charged a 10% commission, and if the profit is higher than RMB 100,000, the part below RMB 100,000 will be charged a 10% commission.
- C language test question ninety-nine implements an integer. After adding 100, it is a complete square number, and then adding 168 is another complete square number. What is the number
- C language test questions 100 enter a certain day of a certain month and day of a certain year, and determine which day of this year it is
- Input three integers x, y, z in C language test question 101, please output these three numbers from small to large
- C language test question 102 uses * to output the pattern of letter C
- The output special pattern in C language test question 103, please run it in c environment and take a look
- C language test question 104 output 9 times 9 formula
- Requirements for C language test 105 output chess board
- There is a pair of rabbits in C language test question 106. From the third month after birth, a pair of rabbits will be born every month. The little rabbit will grow to the third month and a pair of rabbits will be born every month. If the rabbits do not die, what is the total number of rabbits in each month?
- C language test question 107: How many prime numbers are there between 101 and 200, and output all prime numbers.
- C language test question 108 prints out all the "Narcissus Number". The so-called "Narcissus Number" refers to a three-digit number whose digits are cube-sum equal to the number itself. For example: 153 is a "dazzling number", because 153=1 cubic power +5 cubic power +3 cubic power.
- C language test question 109 decomposes a positive integer to the prime factor. For example: Enter 90, print out 90=2 by 3 by 3 by 5
- The C language test question 110 uses the nesting of conditional operators to complete this question: students with academic scores of 90 or more are represented by A, those between 60 and 89 are represented by B, and those below 60 are represented by C.
- The value of s=a+aa+aaa+aaa+aaa...a in C language test question 111, where a is a number. For example, 2+22+222+2222+2222 (At this time, there are 5 numbers added together), and the addition of several numbers is controlled by keyboard.
- If a number in C test question 112 is exactly equal to the sum of its factors, this number is called "finished number". For example, 6=1+2+3. Programming Find all the completed numbers within 1000.
- One of the 113 balls in C language tests fell freely from a height of 100 meters, and rebounded back to half of the original height after each landing; fall again, find out how many meters it has passed when it lands on the 10th time? How high is the 10th rebound?
- C Language Test Question 114: Monkey Eating Peach Question
- The two table tennis teams in C language test question 115 competed, with three players each. Team A is three people a, b, c, and team B is three people x, y, z. The draw has been decided on the match list. Someone asked the players about the list of the competition. a said he did not compete with x, c said he did not compete with x,z, please
- The following pattern (diamond) is printed in C language test 116.
- There is a sequence of scores in C language test question 117: 2/1, 3/2, 5/3, 8/5, 13/8, 21/13... Find the sum of the first 20 items of this sequence
- C language test question 118 finds the sum of the hierarchy of each number from 1 to 20
- C Language Test Question 119: Using Recursive Method to Find the Level of 5
- Enter two positive integers m and n in C language test question 120, find the greatest common divisor and the least common multiple
- Enter a line of characters in C test question 121 to count the number of English letters, spaces, numbers and other characters.
- The C language test question 122 uses recursive function call method to print out the input 5 characters in reverse order.
- There are 5 people sitting together and asking how old the fifth person is? He said he was 2 years older than the fourth. When asked about the age of the fourth person, he said he was 2 years older than the third person. When asked the third person, he said he was two years older than the second person. Ask the second person, say it is better than the first one
- In C language test question 124, give a positive integer of no more than 5 digits. Requirements: 1. Find how many digits it is, 2. Print out all digits in reverse order.
- A 5-digit number in C language test question 125, determine whether it is a palindrome number. That is, 12321 is the number of palindromes, the number of single digits is the same as ten thousand digits, and the number of ten digits is the same as thousands
- Prime numbers within 100 of C language test question 127
- Sorting 10 numbers in C language test questions 128
- C Language Test Question 129 Find a sum of 3 by 3 matrix diagonal elements
- There is an array already sorted in C test question 130. Now enter a number and ask to insert it into the array according to the original rules.
- C language test question 131 outputs an array in reverse order.
- In C language test question 132, take an integer a 4 to 7 digits starting from the right end.
- C Language Test Question 133: The circle shape
- C Language Test Question 134: Drawing Line
- C Language Test Question 135: Painting Square
- C language test question 136 print out Yang Hui triangle (requires 10 lines printed out as shown below)
- C Language Test Question 137 Drawing Points
- C Language Test Question 138: Painted Oval
- Input 3 numbers a, b, c in C language test 139, output in order of size (using pointers)
- The input array of C language test question 140, the largest exchange with the first element, the smallest exchange with the last element, the output array
- There are n integers in C language test question 141, so that the preceding numbers are moved backwards by m positions in order, and the last m numbers become the first m numbers
- C language test questions 142 n Individuals are in a circle and numbers are arranged in sequence. Start counting from the first person (from 1 to 3), and those who report to 3 leave the circle and ask the last person who is the original number.
- C Language Test Question 143 write a function, find the length of a string, enter the string in the main function, and output its length
- C language test question 144 write function input and output 5 student data records.
- C Language Test Question 145: Create a Link List