Section H PC Quiz 1

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By ABC
A
ABC
Community Contributor
Quizzes Created: 1 | Total Attempts: 126
| Attempts: 126 | Questions: 70
Please wait...
Question 1 / 70
0 %
0/100
Score 0/100
1. Identify the correct way of variable declearation

Explanation

The correct way of variable declaration is A_B. Variable names can only contain letters, numbers, and underscores, and must start with a letter or an underscore. The option 1A_B is incorrect because it starts with a number. The option "if" is incorrect because it is a reserved keyword in most programming languages and cannot be used as a variable name. The option AB@3 is incorrect because it contains a special character (@) which is not allowed in variable names.

Submit
Please wait...
About This Quiz
Section H PC Quiz 1 - Quiz

This quiz assesses knowledge on basic programming syntax, including variable naming, operator precedence, and reserved keywords in programming languages.

2. Keyword to define any constant variable

Explanation

The correct answer is "const". In programming, the keyword "const" is used to define a constant variable. A constant variable is a value that cannot be changed once it is assigned. By using the "const" keyword, the programmer can ensure that the value of the variable remains constant throughout the program.

Submit
3. The declaration "unsigned u" indicates u is a/an

Explanation

The declaration "unsigned u" indicates that the variable "u" is an unsigned integer. The keyword "unsigned" is used to specify that the variable can only hold non-negative values and increases the range of positive values that can be stored. Therefore, "u" can store only positive integers or zero, and cannot hold negative values or characters.

Submit
4. If s and b are integers then purpose of the following program fragment is to: b = s + b ;s = b - s ; b = b - s ;

Explanation

The purpose of the program fragment is to exchange (swap) the contents of s and b. This is achieved by using a temporary variable to store the value of one variable while the values of both variables are being swapped. The first line of code assigns the sum of s and b to b, effectively storing the value of s in b. The second line of code assigns the difference between b and s to s, which swaps the values of s and b. Finally, the third line of code assigns the difference between b and s to b, effectively storing the original value of b in s.

Submit
5. Which of this is invalid variable name

Explanation

The variable name "double" is invalid because it is a reserved keyword in many programming languages, including Java and C++. Reserved keywords have a special meaning in the language and cannot be used as variable names.

Submit
6. Scanf("%d", x); Why this statement will give error ?

Explanation

The absence of the "&" symbol before the variable "x" in the scanf() function will cause an error. The "&" symbol is used to pass the address of the variable to the function, allowing it to directly modify the value stored at that address. Without the "&" symbol, the function will not be able to access the memory location of the variable, resulting in an error.

Submit
7. Which one is allowed assignment in 'C'

Explanation

The correct answer is "a=b=c=8;" because in C programming, multiple variables can be assigned the same value in a single statement. This statement assigns the value 8 to variables a, b, and c simultaneously.

Submit
8. Which is an incorrect variable name?

Explanation

The variable name "Id No" is incorrect because it contains a space, which is not allowed in variable names. Variable names should not have spaces or special characters, and should be written in a way that is clear and meaningful.

Submit
9. If 'a' is an integer variable, then a=5/2 will return a value

Explanation

The expression "a=5/2" assigns the value of the division 5/2 to the variable 'a'. In integer division, the result is the quotient without any decimal places. Therefore, the result of 5/2 is 2, and this value will be assigned to 'a'.

Submit
10. Which of the follwing symbol is format specifier?

Explanation

The symbol "%d" is a format specifier. In programming, format specifiers are used to define the type and format of data that should be printed or read. In this case, "%d" is used to format and print an integer value.

Submit
11. Which of the following is the valid variable name?

Explanation

The variable name "number" is valid because it starts with a letter, which is a requirement for variable names in most programming languages. Additionally, it does not contain any special characters or symbols, and it consists of only alphanumeric characters.

Submit
12. How many keywords are there in C Language?

Explanation

There are 32 keywords in the C Language. Keywords are reserved words that have a specific meaning in the programming language and cannot be used as variable names or identifiers. These keywords are predefined and have a specific purpose in the C Language syntax.

Submit
13. The Opertor which compares the two values is

Explanation

The correct answer is "Relational." Relational operators are used to compare two values and determine the relationship between them, such as whether one value is equal to, greater than, or less than the other. These operators include symbols like == (equal to), != (not equal to), > (greater than), = (greater than or equal to), and

Submit
14. Which of this is valid variable name

Explanation

The variable name "row_1" is valid because it follows the rules for naming variables. In most programming languages, variable names can only contain letters, numbers, and underscores. They cannot start with a number or contain any special characters or spaces. "row_1" satisfies these requirements and is therefore a valid variable name.

Submit
15. Identify the correct sequence of steps to run a program

Explanation

The correct sequence of steps to run a program is to first write the code, then compile it to convert it into machine-readable instructions, followed by linking the compiled code with any necessary libraries or dependencies. After that, the program is loaded into memory, and finally, it is executed or run.

Submit
16. Which of this reserved keyword in C language ?

Explanation

The correct answer is "break". In the C language, "break" is a reserved keyword that is used to terminate a loop or switch statement. It is used to exit a loop prematurely when a certain condition is met or to exit a switch statement after a specific case is executed. The use of "break" as a variable or function name is not allowed in C as it is reserved for this specific purpose.

Submit
17. Int main() { printf("%d", 0&&4);

Explanation

The code snippet `printf("%d", 0&&4);` uses the logical AND operator (`&&`) to evaluate the expression `0&&4`. In this case, the expression evaluates to `0` because both operands are non-zero values. According to the rules of the logical AND operator, if any of the operands is `0`, the result is `0`. Therefore, the output of the `printf` statement will be `0`.

Submit
18. Which language does not need any translator?

Explanation

Machine language does not need any translator because it is the lowest-level programming language that can be directly understood and executed by a computer's hardware. It consists of binary code instructions that are specific to the computer's architecture. As a result, no translation or interpretation is required for the computer to understand and execute the instructions in machine language.

Submit
19. Operator & is used for

Explanation

The operator "&" is used for performing a bitwise AND operation. Bitwise AND compares the corresponding bits of two numbers and returns a new number where each bit is set to 1 only if both corresponding bits in the original numbers are 1. This operator is commonly used in programming to manipulate individual bits within binary numbers.

Submit
20. Int a; a=15^13; printf("%d", a);

Explanation

The given code calculates the bitwise XOR of 15 and 13, which results in 2. The XOR operation compares the corresponding bits of two numbers and returns 1 if they are different, and 0 if they are the same. In this case, the binary representation of 15 is 1111 and the binary representation of 13 is 1101. When performing the XOR operation, the bits that are different are set to 1, resulting in the binary representation of 2, which is 0010. Therefore, the value of variable 'a' is 2, and when printed using printf, it will display 2.

Submit
21. An expression contains relational, assignment and arithmetic operators. If parenthesis are not specified, the order of evaluation of the operators would be:

Explanation

The given answer is "arithmetic, relational, assignment". In an expression without specified parentheses, the arithmetic operators are evaluated first, followed by the relational operators, and finally the assignment operators. This order ensures that any necessary calculations are performed before making comparisons and assigning values to variables.

Submit
22. Which constant can be expressed both in fractional and exponential forms?

Explanation

The constant "float" can be expressed both in fractional and exponential forms. In fractional form, it represents a decimal number with a fractional part, such as 3.14. In exponential form, it can be expressed as a number multiplied by a power of 10, such as 3.14 x 10^1. This flexibility allows for greater precision and a wider range of values compared to other data types like "char", "void", and "int".

Submit
23. Identify the valid variable name

Explanation

The valid variable name in this case is "Floats". Variable names can consist of letters, numbers, and underscores, but they cannot start with a number or contain special characters like "+". "Initial.Name" is not a valid variable name because it contains a dot, which is not allowed. "$ABC" is also not a valid variable name because it starts with a special character. Therefore, the correct answer is "Floats".

Submit
24. The format identifier ‘%i’ is also used for _____ data type.

Explanation

The format identifier '%i' is commonly used for the int data type. This format specifier is used in C programming to display or read integer values. It is used with functions like printf() and scanf() to format the output or input of integer values.

Submit
25. In an assignment statement a=b; which of the following statement is true ?

Explanation

The correct answer is that the value of b is assigned to variable a but if b changes later, it will not affect the value of variable a. This is because in an assignment statement, the value of the variable on the right side of the assignment operator (=) is assigned to the variable on the left side. However, any changes made to the variable on the right side after the assignment will not affect the value of the variable on the left side.

Submit
26. #define ISEQUAL(X, Y) X==Y void main(){ int X, Y; printf("%d", ISEQUAL(X,1));}

Explanation

The code defines a macro function ISEQUAL that takes two arguments X and Y and checks if X is equal to Y using the equality operator ==. In the main function, variables X and Y are declared. The printf statement prints the result of calling the ISEQUAL macro function with X as the first argument and 1 as the second argument. Since X is not initialized, its value is undefined, and the result of the comparison will be unpredictable. Therefore, the output could be any value, but it is most likely to be 0.

Submit
27. An external variable

Explanation

An external variable is a variable that is declared outside of any function and is accessible by all functions in a program. It has a global scope, meaning it can be accessed from anywhere in the program. If an external variable is not explicitly initialized, it will automatically be initialized to 0. Therefore, the correct answer is that an external variable is globally accessible by all functions, has a declaration, and will be initialized to 0 if not initialized.

Submit
28. Sizeof(long int) output will be … ?

Explanation

The correct answer is 32 because the sizeof() operator in C++ returns the size in bytes of the data type or variable specified. In this case, the data type is long int, which typically has a size of 4 bytes on most systems. Therefore, the output of sizeof(long int) will be 32 bits.

Submit
29. Which of the following is not a premitive data type in 'C' language?

Explanation

In the 'C' language, double, char, and float are all primitive data types. However, array is not a primitive data type in 'C'. An array is a collection of elements of the same data type, and it is considered a derived data type in 'C'.

Submit
30. Which operators are used to compare the values of operands to produce logical value in C language?

Explanation

Relational operators are used to compare the values of operands in C language. These operators compare two values and return a logical value (true or false) based on the comparison. Examples of relational operators in C include equal to (==), not equal to (!=), greater than (>), less than (=), and less than or equal to (

Submit
31. An operator used to check a condition and select a value depending on the value of the condition is called

Explanation

The conditional or ternary operator is used to check a condition and select a value based on the result of that condition. It allows for concise and efficient code by providing a shorthand way to write if-else statements. The operator consists of a condition followed by a question mark, then a value to be returned if the condition is true, and a colon followed by a value to be returned if the condition is false. This operator is commonly used in programming languages like C, C++, and Java.

Submit
32. Which of the follwing is a ternary operator

Explanation

The ternary operator is a conditional operator that takes three operands. It is represented by the symbol "?:". The first operand is a condition, the second operand is the value returned if the condition is true, and the third operand is the value returned if the condition is false. Therefore, the correct answer is ?: as it represents the ternary operator.

Submit
33. The result of a relational operator is always

Explanation

The result of a relational operator can be either true or false, depending on the comparison being made. For example, if we compare two numbers using the greater than operator, the result will be true if the first number is indeed greater than the second number, and false otherwise. Similarly, if we compare two strings using the equal to operator, the result will be true if the two strings are equal, and false otherwise. Therefore, the correct answer is "True OR False" because the result of a relational operator can be either true or false.

Submit
34. Int x=23, y; y= x--; printf("%d%d", x, y);

Explanation

In this code snippet, the variable x is initially assigned the value 23. Then, the post-decrement operator (--) is used to decrement the value of x by 1. However, since the post-decrement operator is used, the value of x is first assigned to y and then decremented. Therefore, the value of y remains 23. Finally, the printf statement prints the values of x and y, which are 22 and 23 respectively.

Submit
35. Int a; a=5&&4; printf("%d", a);

Explanation

The expression "5 && 4" is a logical AND operation. In C programming, the logical AND operator (&&) returns true (1) if both operands are non-zero, and false (0) otherwise. Since both 5 and 4 are non-zero, the result of the logical AND operation is true (1). Therefore, the value of the variable "a" is 1. When we use the printf function to print the value of "a", it will output "1".

Submit
36. The words if, else, auto, float etc. have predefined meaning and users cannot use them as variables. These words are called

Explanation

The words if, else, auto, float etc. have predefined meanings in programming languages and cannot be used as variables. They are reserved words that have specific functionalities within the language. These words are commonly referred to as keywords.

Submit
37. ? and : are called

Explanation

The symbols "?" and ":" are called conditional operators because they are used to create conditional expressions in programming languages. These operators evaluate a condition and return one of two values based on the result of the condition. The "?" symbol is used to specify the condition, while the ":" symbol is used to separate the two possible values. This allows for concise and efficient coding of conditional statements.

Submit
38. Algorithm should be

Explanation

The algorithm should be both precise and unambiguous. Being precise means that the algorithm should provide clear and specific instructions, leaving no room for interpretation. This ensures that the algorithm can be executed accurately and consistently. Being unambiguous means that the algorithm should have only one possible interpretation, eliminating any confusion or ambiguity in understanding the steps. By being both precise and unambiguous, the algorithm can be easily understood and implemented by both humans and computers.

Submit
39. Choose the correct option among which will be valid after this following statement #define PI 54.453

Explanation

After the statement "#define PI 54.453", the value of PI is defined as 54.453. Then, the statement "PI=3.141" attempts to reassign a new value to PI, which is not valid because PI is a constant defined using the #define directive. Therefore, the value of PI remains 54.453. The statement "area = 3.2*PI" calculates the area by multiplying 3.2 with the value of PI, which is 54.453. Hence, the correct option is "area = 3.2*PI".

Submit
40. In the passage of text, individual words and punctuation marks are known as

Explanation

In the passage of text, individual words and punctuation marks are known as delimiters. Delimiters are used to separate or mark the boundaries between different elements in a text, such as words or sentences. They help to identify the structure and meaning of the text by indicating where one element ends and another begins. In this context, delimiters refer to both individual words and punctuation marks that serve this purpose.

Submit
41. Int main() {char a = 'a'; printf("%d", a); return 0;}

Explanation

The given code snippet declares a variable 'a' of type char and assigns it the value 'a'. The printf statement is used to print the value of 'a' as an integer using the %d format specifier. In ASCII, the character 'a' has an integer value of 97. Therefore, the code will output 97.

Submit
42. Which of the following cannot be used as identifiers independely ?

Explanation

Spaces cannot be used as identifiers independently because spaces are not allowed in variable or identifier names. In programming languages, spaces are used to separate different parts of a statement or expression. Therefore, using spaces as identifiers would result in a syntax error.

Submit
43. The size of unsigned integer ?

Explanation

The correct answer is "0 to 65536" because an unsigned integer can only hold positive values and zero. In this case, the range is from 0 to 65536, which includes all the possible values that can be represented by an unsigned integer.

Submit
44. Choose the correct statements

Explanation

All of the given statements are correct. An identifier in programming is a name used to identify a variable, function, or any other user-defined item. It may start with an underscore, it may end with an underscore, and "IF" is a valid identifier. Identifiers in programming languages have certain rules and conventions, but these statements adhere to those rules and are therefore correct.

Submit
45. A name start with letters or underscore is called

Explanation

An identifier is a name that starts with letters or an underscore. It is used to identify variables, functions, classes, or any other user-defined item in a program. Identifiers cannot be the same as reserved keywords, which are predefined words with special meanings in the programming language. Tokens are the individual units of a program, including identifiers, keywords, operators, and literals. Therefore, the correct answer is identifiers.

Submit
46. Int main() { printf("%d", 3>>1);
>1);">

Explanation

The expression "3>>1" is a right shift operation in C. In this case, it means shifting the bits of the number 3 to the right by 1 position. Shifting a number to the right by 1 is equivalent to dividing it by 2. Therefore, the result of "3>>1" is 1.

Submit
47. Associativity of = operator is.

Explanation

The associativity of the = operator is right to left. This means that when there are multiple assignments in a single line of code, the rightmost assignment is evaluated first and then the result is assigned to the leftmost variable. For example, in the expression "a = b = c", the value of c is assigned to b first, and then the value of b is assigned to a.

Submit
48. Int main() { printf("%d", sizeof(long long double)); }

Explanation

The code will produce an error because "long long double" is not a valid data type in C. It seems to be a combination of two different data types, "long long" and "double", which are not allowed to be combined in this way. Therefore, the code will not compile and an error will be thrown.

Submit
49. Int a; a=10

Explanation

The given code declares a variable 'a' and assigns it a value of 10. However, the value of 10 is not used or referenced in any way. The next line of code is 20, which means that the value 20 is the output or result of the code.

Submit
50. Which of this is valid statement

Explanation

The correct answer is #define X 2. This is a valid statement because it follows the syntax for defining a constant in C programming language. The statement starts with the #define keyword, followed by the name of the constant (X in this case), and then the value assigned to the constant (2 in this case). The value assigned to the constant can be any valid expression or literal value.

Submit
51. The minimum number of temporary variables needed to swap the contents of two variables is

Explanation

Swapping the contents of two variables can be done without using any temporary variables by using the concept of bitwise XOR. By performing XOR operations on the two variables, the values of the variables can be swapped without the need for any additional variables. Therefore, the minimum number of temporary variables needed to swap the contents of two variables is 0.

Submit
52. A sequence of instruction ,in a computer language , to get the desired result is known as

Explanation

An algorithm is a sequence of instructions in a computer language that is designed to solve a specific problem or achieve a desired result. It is a step-by-step procedure that outlines the logic and operations needed to solve a problem. Algorithms are used in programming to provide a clear and structured approach to problem-solving, allowing the computer to execute the instructions and produce the desired output. Unlike decision tables or programs, algorithms are not specific to a particular programming language and can be implemented in various languages.

Submit
53. C language programs are converted into machine language by

Explanation

C language programs are converted into machine language by a compiler. A compiler is a software program that translates the entire source code written in a high-level programming language like C into machine code that can be understood and executed by the computer's processor. The compiler performs various tasks such as lexical analysis, syntax analysis, semantic analysis, optimization, and code generation to convert the code into machine language. Therefore, a compiler is the correct answer for this question.

Submit
54. For a 2 bit integer int main() {int a = 40000; printf("%d", a); return 0;}

Explanation

The given code declares an integer variable 'a' and assigns it a value of 40000. However, since a 2-bit integer can only represent values from -2^(n-1) to 2^(n-1)-1 (where n is the number of bits), the value 40000 is outside the range and overflows. As a result, the value of 'a' becomes -25536, which is the equivalent value after the overflow. Thus, the correct answer is -25536.

Submit
55. Int a=10, b=4;c; a=a/b; printf(" %d", a); output will be ….

Explanation

The output will be 2. This is because when the division operation is performed between two integers, the result will be an integer. In this case, 10 divided by 4 is 2 with a remainder of 2. Since the result is an integer, the decimal part is truncated and only the whole number part is printed.

Submit
56. Size of the interger that is supported by gcc compiler is:

Explanation

The size of the integer supported by the gcc compiler is 4 Bytes. This means that the compiler can handle integers that occupy 4 bytes of memory. This is a common size for integers on many systems, as it allows for a wide range of values to be stored.

Submit
57. Int main() {char a = 125'; a = a + 10; printf("%d", a); return 0;}

Explanation

In this code, the variable 'a' is declared as a char with an initial value of 125. Then, 'a' is incremented by 10. However, since a char can only hold values from -128 to 127, the value of 'a' overflows and wraps around to -121. Therefore, when the value of 'a' is printed using printf, it will display -121.

Submit
58. Int a=10; printf(" %d", a+5);

Explanation

The given code snippet declares an integer variable "a" and assigns it a value of 10. Then, it uses the printf function to print the value of "a+5". Since the value of "a" is 10, "a+5" evaluates to 15. Therefore, the correct answer is 15.

Submit
59. Int main() { printf("%d", 3

Explanation

The given code prints the result of the expression "3 First, it evaluates "3 Then, it compares 0 with 3, which is also false (0).
Next, it compares 0 with 6, which is again false (0).
Finally, it compares 0 with 1, which is true (1).
The printf statement prints the final result, which is 1.

Submit
60. Which of the following is invalid C constant?

Explanation

The constant "35,550" is invalid because it contains a comma, which is not allowed in C constants. C constants can only consist of digits and a decimal point (if it is a floating-point constant).

Submit
61. Int a; a=10>>1; printf("%d", a);

Explanation

The given code assigns the value 10 to the variable 'a' and then performs a right shift operation on 'a' by 1 bit. The right shift operation divides 'a' by 2, effectively halving its value. Therefore, the value of 'a' after the right shift operation is 5. The code then prints the value of 'a', which is 5.

Submit
62. Int main() { printf("%d", 3|4);

Explanation

The bitwise OR operator "|" is used to perform a bitwise OR operation on the binary representations of two integers. In this case, the binary representation of 3 is 0011 and the binary representation of 4 is 0100. Performing the OR operation on these two binary numbers results in 0111, which is equal to 7 in decimal form. Therefore, the correct answer is 7.

Submit
63. Which of the following is not a valid declaration in C?

Explanation

All the given declarations are valid in C except for "unsigned short x". In C, the "unsigned" keyword is used to declare variables that can only hold positive values or zero. However, "short" is a valid data type in C, and it can be used with or without the "signed" keyword. Therefore, the declaration "unsigned short x" is not valid because it combines the "unsigned" and "short" keywords, which is not allowed in C.

Submit
64. Name of compiler to run c program on linux opetating system

Explanation

Both gcc and cc are compilers that can be used to run C programs on a Linux operating system. The gcc compiler is the most commonly used compiler for C programs on Linux. However, cc is also a compiler that is available on some Linux systems and can be used to compile and run C programs. Therefore, both gcc and cc are valid options for running C programs on a Linux operating system.

Submit
65. Int a; a=5||0; printf("%d", a);

Explanation

In this code, the variable "a" is assigned the value of the logical OR operation between 5 and 0. The logical OR operator returns true (1) if either of the operands is true, and false (0) if both operands are false. In this case, 5 is considered true, and 0 is considered false. Since the logical OR operation only needs one true value to return true, the value of "a" is 1. However, when printing "a" using the printf function, the format specifier %d is used, which is used to print integers. Therefore, the value of "a" is printed as 0.

Submit
66. Int main() { printf("%d", sizeof(long long int)); }

Explanation

The correct answer is both (A) and (B). The warning message related to int is because the code is using the %d format specifier in the printf function, which expects an int argument. However, the sizeof operator returns a value of type size_t, which is typically an unsigned integer type. Therefore, there is a mismatch between the format specifier and the argument type, resulting in a warning. The value printed is 8, which is the size in bytes of a long long int on the particular system where the code is being executed.

Submit
67. Int main() { int a =1; printf("%d%d%d", a, a++, ++a);

Explanation

The code snippet starts by initializing the variable 'a' with a value of 1. Then, the printf statement is used to print the values of 'a', 'a++', and '++a'.

The expression 'a++' means that the current value of 'a' is used in the printf statement, and then 'a' is incremented by 1. So, the first 'a' in the printf statement will be 1.

The expression '++a' means that 'a' is incremented by 1, and then the new value of 'a' is used in the printf statement. So, the third 'a' in the printf statement will be 3.

Therefore, the output of the printf statement will be "323", which matches the given answer.

Submit
68. Int main() { int b =1; printf("%d%d%d", b++, b, b++);

Explanation

The expression `b++` is a post-increment operator, which means that the value of `b` is incremented after it is used in the expression. In the `printf` statement, the order of evaluation is from right to left. So, `b++` is evaluated first and the value of `b` becomes 2. Then, `b` is evaluated as 2 in the second `b` in the `printf` statement. Finally, `b++` is evaluated again and the value of `b` becomes 3. Therefore, the output is "231".

Submit
69. Int a; a=5&4; printf("%d", a);

Explanation

The code initializes the variable 'a' and assigns it the result of the bitwise AND operation between 5 and 4. The bitwise AND operation compares the binary representation of the two numbers and returns a new number where each bit is set to 1 only if the corresponding bits in both numbers are also 1. In this case, the binary representation of 5 is 101 and the binary representation of 4 is 100. Performing the bitwise AND operation, we get 100, which is equal to 4 in decimal. Therefore, the correct answer is 4.

Submit
70. #define ISEQUAL(X, Y) X==Y void main(){ int X, Y; printf("%d", ISEQUAL(X,0));}

Explanation

The given code snippet defines a macro function ISEQUAL(X, Y) which checks if X is equal to Y. In the main function, X and Y are declared as integers. Then, the printf statement prints the result of calling the ISEQUAL macro with X as the first argument and 0 as the second argument. Since X is not initialized, its value is undefined. Therefore, the result of the comparison X==0 is unpredictable, and the output can be either 1 or 0.

Submit
View My Results

Quiz Review Timeline (Updated): May 3, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • May 03, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 31, 2019
    Quiz Created by
    ABC
Cancel
  • All
    All (70)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Identify the correct way of variable declearation
Keyword to define any constant variable
The declaration "unsigned u" indicates u is a/an
If s and b are integers then purpose of the following program fragment...
Which of this is invalid variable name
Scanf("%d", x); Why this statement will give error ?
Which one is allowed assignment in 'C'
Which is an incorrect variable name?
If 'a' is an integer variable, then a=5/2 will return a value
Which of the follwing symbol is format specifier?
Which of the following is the valid variable name?
How many keywords are there in C Language?
The Opertor which compares the two values is
Which of this is valid variable name
Identify the correct sequence of steps to run a program
Which of this reserved keyword in C language ?
Int main() { printf("%d", 0&&4);
Which language does not need any translator?
Operator & is used for
Int a; a=15^13; printf("%d", a);
An expression contains relational, assignment and arithmetic...
Which constant can be expressed both in fractional and exponential...
Identify the valid variable name
The format identifier ‘%i’ is also used for _____ data type.
In an assignment statement a=b; which of the following statement is...
#define ISEQUAL(X, Y) X==Y void main(){ int X, Y; printf("%d",...
An external variable
Sizeof(long int) output will be … ?
Which of the following is not a premitive data type in 'C' language?
Which operators are used to compare the values of operands to produce...
An operator used to check a condition and select a value depending on...
Which of the follwing is a ternary operator
The result of a relational operator is always
Int x=23, y; y= x--; printf("%d%d", x, y);
Int a; a=5&&4; printf("%d", a);
The words if, else, auto, float etc. have predefined meaning and users...
? and : are called
Algorithm should be
Choose the correct option among which will be valid after this...
In the passage of text, individual words and punctuation marks are...
Int main() {char a = 'a'; printf("%d", a); return 0;}
Which of the following cannot be used as identifiers independely ?
The size of unsigned integer ?
Choose the correct statements
A name start with letters or underscore is called
>1);" type="button" name="46" value="46" > >1);" > Int main() { printf("%d", 3>>1);
Associativity of = operator is.
Int main() { printf("%d", sizeof(long long double)); }
Int a; a=10
Which of this is valid statement
The minimum number of temporary variables needed to swap the contents...
A sequence of instruction ,in a computer language , to get the desired...
C language programs are converted into machine language by
For a 2 bit integer int main() {int a = 40000; printf("%d", a); return...
Int a=10, b=4;c; a=a/b; printf(" %d", a); output will be ….
Size of the interger that is supported by gcc compiler is:
Int main() {char a = 125'; a = a + 10; printf("%d", a); return 0;}
Int a=10; printf(" %d", a+5);
Int main() { printf("%d", 3
Which of the following is invalid C constant?
Int a; a=10>>1; printf("%d", a);
Int main() { printf("%d", 3|4);
Which of the following is not a valid declaration in C?
Name of compiler to run c program on linux opetating system
Int a; a=5||0; printf("%d", a);
Int main() { printf("%d", sizeof(long long int)); }
Int main() { int a =1; printf("%d%d%d", a, a++, ++a);
Int main() { int b =1; printf("%d%d%d", b++, b, b++);
Int a; a=5&4; printf("%d", a);
#define ISEQUAL(X, Y) X==Y void main(){ int X, Y; printf("%d",...
Alert!

Advertisement