What will be the output of the following program? #include\<stdio.h> int main(){ extern int i; i = 20; printf("%ld ", sizeof(i)); return 0; } Depends on the Compiler 2 Linker Error : Undefined symbol 'i' 4 TRUE ANSWER : ? YOUR ANSWER : ?
The default parameter passing mechanism is call by value result call by value call by reference None of these. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of given program?#include<stdio.h>void main(){int a=3;for(;a;printf("%d ", a--);} infinity loop no output 3 2 1 0 3 2 1 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));} 2 4 5 5 5 5 2 4 4 2 5 5 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} 10..50 0 10..10 Error TRUE ANSWER : ? YOUR ANSWER : ?
What will be printed when this program is executed?int f(int x){ if(x <= 4) return x; return f(--x);}void main(){ printf("%d ", f(7)); } 1 2 3 4 4 Syntax error Runtime error 4 5 6 7 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program ?#includevoid main(){ float arr[] = {12.4, 2.3, 4.5, 6.7}; printf("%d", sizeof(arr)/sizeof(arr[0]));} 5 6 7 None of these 4 TRUE ANSWER : ? YOUR ANSWER : ?
The library function used to find the last occurrence of a character in a string is None of these strnstr() strrchr() laststr() strstr() TRUE ANSWER : ? YOUR ANSWER : ?
Array passed as an argument to a function is interpreted as Address of the array. Address of the first element of the array. Values of the first elements of the array. Number of element of the array. TRUE ANSWER : ? YOUR ANSWER : ?
Determine output:void main(){ int i=0, j=1, k=2, m; m = i++ || j++ || k++; printf("%d %d %d %d", m, i, j, k);} 1 1 2 3 0 1 2 3 0 1 2 2 None of these 1 1 2 2 TRUE ANSWER : ? YOUR ANSWER : ?