Use of functions Helps to avoid repeated programming across programs. All of these Makes the debugging task easier. Enhances the logical clarity of the program. Helps to avoid repeating a set of statements many times. TRUE ANSWER : ? YOUR ANSWER : ?
What would be the output for the following Turbo C code?#include<stdio.h>void main(){ int a[]={ 1, 2, 3, 4, 5 }, *p; p=a; ++*p; printf("%d ", *p); p += 2; printf("%d", *p);} 2 2 2 4 3 4 3 3 2 3 TRUE ANSWER : ? YOUR ANSWER : ?
Comment on the following pointer declaration?int *ptr, p; ptr and p both are not pointers to integer. ptr is pointer to integer, p may or may not be. ptr and p, both are pointers to integer. ptr is a pointer to integer, p is not. TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.#includevoid main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);} 11 12 Compilation error 14 13 TRUE ANSWER : ? YOUR ANSWER : ?
#include<stdio.h>void main(){ int *ptr, a=10; ptr = &a; *ptr += 1; printf("%d, %d", *ptr, a);} 11, 10 10, 10 11, 11 10, 11 TRUE ANSWER : ? YOUR ANSWER : ?
If the two strings are identical, then strcmp() function returns 0 None of these 1 -1 true 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++) There should be a semicolon at the end of the statement. The increment should always be ++k . The variable must always be the letter i when using a for loop. The variable k can’t be initialized. The commas should be semicolons. TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));} 8 5 5 2 4 4 2 4 5 2 5 5 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program ?#include<stdio.h>void main(){ printf(5+"Good Morningn");} Good M Good Morning Morning None of these TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#include<stdio.h>void main(){ int i=10; printf("i=%d", i); { int i=20; printf("i=%d", i); i++; printf("i=%d", i); } printf("i=%d", i);} 10 20 21 10 10 20 21 21 10 10 11 11 10 20 21 20 TRUE ANSWER : ? YOUR ANSWER : ?