Which of the following statements are true after execution of the program.void main(){ int a[10], i, *p; a[0] = 1; a[1] = 2; p = a; (*p)++;} a[1] = 3 a[0] = 2 a[1] = 2 a[0] = 3 Compilation error TRUE ANSWER : ? YOUR ANSWER : ?
Determine the Final Output:void main(){ printf("\nab"); printf("\bsi"); printf("\rha");} asiha haasi absiha hai TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.void main(){ int array[10]; int *i = &array[2], *j = &array[5]; int diff = j-i; printf("%d", diff);} Garbage value 3 Error 6 TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of given program if user enter value 99?#include<stdio.h>void main(){int i;printf("Enter a number:");scanf("%d", &i); // 99 is given as input.if(i%5 == 0){printf("nNumber entered is divisible by 5"); }} Enter a number:99 Number is divisible by 5 complier error Enter a number:99 Run time error TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program. void main() { int i=01289; printf("%d", i); } 1289 713 Syntax error 0289 0713 TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following is not a valid identifier? _examians exam_veda 1examians examians1 TRUE ANSWER : ? YOUR ANSWER : ?
What number will z in the sample code given below?int z, x=5, y= -10, a=4, b=2;z = x++ - --y*b/a; 10 11 5 9 6 TRUE ANSWER : ? YOUR ANSWER : ?
Choose the correct statement.I. The scope of a macro definition need not be the entire program.II. The scope of a macro definition extends from the point of definition to the end of the file.III. New line is a macro definition delimiter.IV. A macro definition may go beyond a line. II and III I, II and III II, III and IV I and II I, II, III and IV TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.void main(){ char *msg = "hi"; printf(msg);} Garbage Value Error hi followed by garbage value h hi TRUE ANSWER : ? YOUR ANSWER : ?
What's wrong in the following statement, provided k is a variable of type int?for(k = 2, k <=12, k++) The variable k can’t be initialized. The increment should always be ++k . The variable must always be the letter i when using a for loop. There should be a semicolon at the end of the statement. The commas should be semicolons. TRUE ANSWER : ? YOUR ANSWER : ?