Consider the following program fragment:for(c=1, sum=0; c <= 10; c++){ scanf("%d", &x); if( x < 0 ) continue; sum += x;}What would be the value of sum for the input 1, -1, 2, -2, 3, -3, 4, -4, 5, -5 15 1 30 10 -5 TRUE ANSWER : ? YOUR ANSWER : ?
An array elements are always stored in ________ memory locations. Sequential and Random None of these Random Sequential TRUE ANSWER : ? YOUR ANSWER : ?
In C programming language, which of the following type of operators have the highest precedence Logical operators Arithmetic operators Relational operators Equality operators TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#include<stdio.h>void main(){int a=11,b=5;if(a=5) b++;printf("%d %d", ++a, b++);} 12 7 6 6 6 7 11 6 5 6 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=5; printf("%d%d%d%d%d", i++, i--, ++i, --i, i);} 54554 54544 55445 45545 TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.void main(){ int i=10; /* assume address of i is 0x1234ABCD */ int *ip=&i; int **ipp=&&i; printf("%x,%x,%x", &i, ip, *ipp); } 0x1234ABCD, 10, 10 Syntax error Runtime error 0x1234ABCD, 0x1234ABCD, 10 0x1234ABCD, 0x1234ABCD, 0x1234ABCD TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ? Remainder cannot be obtain in floating point division. rem = 3.14 % 2.1; rem = modf(3.14, 2.1); rem = fmod(3.14, 2.1); TRUE ANSWER : ? YOUR ANSWER : ?
The operator > and < are meaningful when used with pointers, if The pointers point to structure of similar data type. The pointers point to data of similar type. None of these. The pointers point to elements of the same array. TRUE ANSWER : ? YOUR ANSWER : ?
The function sprintf() works like printf(), but operates on .......... stderr Data file no such function in 'C'. string stdin TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output given program?#include<stdio.h>void main(){int i = -10;for(;i;printf("%d ", i++));} -10 to infinite -10 to -1 -10 to 0 Complier error TRUE ANSWER : ? YOUR ANSWER : ?