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 1 30 15 -5 10 TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of the following statements?int i = 0;printf("%d %d", i, i++); 0 1 1 0 None of these 0 0 1 1 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));} 2 4 4 2 5 5 8 5 5 2 4 5 TRUE ANSWER : ? YOUR ANSWER : ?
Determine output:void main(){ extern int i; i=20; printf("%d", sizeof(i));} 2 Linker Error 20 Compiler Error TRUE ANSWER : ? YOUR ANSWER : ?
When a function is recursively called all the automatic variables are stored in a .......... Stack Register Queue Array Linked list TRUE ANSWER : ? YOUR ANSWER : ?
What will be output after executing following code?#include# define a 10void main(){ printf("%d..", a); foo(); printf("%d", a);}void foo(){ #undef a #define a 50} Error 10..10 0 10..50 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++);} 11 6 6 7 6 6 5 6 12 7 TRUE ANSWER : ? YOUR ANSWER : ?
Comment on the following pointer declaration?int *ptr, p; ptr and p, both are pointers to integer. ptr is pointer to integer, p may or may not be. ptr is a pointer to integer, p is not. ptr and p both are not pointers to integer. TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int c = - -2; printf("c=%d", c);} 1 Error -2 2 TRUE ANSWER : ? YOUR ANSWER : ?
The recursive functions are executed in a ........... First In First Out order Iterative order Random order Parallel order Last In First Out order TRUE ANSWER : ? YOUR ANSWER : ?