Consider the following type definition.typedef char x[10];x myArray[5];What will sizeof(myArray) be ? (Assume one character occupies 1 byte) 30 50 None of these 15 10 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following program?#include<stdio.h>void main(){ int i = 10; void *p = &i; printf("%d\n", (int)*p);} Compiler time error Undefined behavior Segmentation fault/runtime crash 10 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the value of sum after the following program is executed?void main(){ int sum=1, index = 9; do{ index = index – 1; sum *= 2; }while( index > 9 );} 0.25 1 9 0.5 2 TRUE ANSWER : ? YOUR ANSWER : ?
The library function used to find the last occurrence of a character in a string is laststr() strstr() strnstr() strrchr() None of these TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output?main() { char *p; p = "Hello"; printf("%cn",*&*p); } Some address will be printed Hello None of these. H TRUE ANSWER : ? YOUR ANSWER : ?
Consider the following code:void main(){ int a[5] = {6,8,3,9,0}, i=0; if(i != 0) { break; printf("%d", a[i]); } else printf("%d", a[i++]);}What is the output of the above program? 6 8 Syntax error Runtime error No output TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following code fragment?void main(){ printf("%x",-1<<4);} fff4 fff3 fff1 fff0 fff2 TRUE ANSWER : ? YOUR ANSWER : ?
Determine output:#include<stdio.h>#define clrscr() 100void main(){ clrscr(); printf("%dn", clrscr());} Error 0 1 100 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ printf("%p", main);} Some address will be printed make an infinite loop None of These Error TRUE ANSWER : ? YOUR ANSWER : ?
#include<stdio.h>void main(){ int *ptr, a=10; ptr = &a; *ptr += 1; printf("%d, %d", *ptr, a);} 10, 11 11, 10 11, 11 10, 10 TRUE ANSWER : ? YOUR ANSWER : ?