August 30, 2016 0 Welcome to your Yippee Technology Online Aptitude Test on C, HTML and CSS Name #include using namespace std; class B { public: void display() { cout<<"Content of base class.\n"; } }; class D : public B { public: void display() { cout<<"Content of derived class.\n"; } }; int main() { B *b; D d; b->display(); b = &d; /* Address of object d in pointer variable */ b->display(); return 0; } A.Content of base class. Content of base class. B.Content of base class. Conitent of derived class. C.Content of derived class. Content of base class. D.Conitent of derived class. Conitent of derived class. D B A C Can you combine the following two statements into one? char *p; p = (char*) malloc(100); A. char p = *malloc(100); B. char *p = (char) malloc(100); C. char *p = (char*)malloc(100); D. char *p = (char *)(malloc*)(100); D A B C Which of the following property allows you to control the shape or appearance of the marker of a list? list-style-position list-style-type list-style-image list-style How do you insert a comment in a CSS file? // this is a comment // // this is a comment Both A and B /* this is a comment */ C Which type of files can’t be opened using fopen()? .bin .txt None of the mentioned .c How can you make a bulleted list with numbers? Which of the following is correct about CSS? CSS is the acronym for "Cascading Style Sheet". All of the above. CSS is used to control the style of a web document in a simple and easy way. You can write CSS once and then reuse same sheet in multiple HTML pages. What is the output of this C code? void foo(float *); int main(){ int i = 10, *p = &i; foo(&i); } void foo(float *p) { printf("%f\n", *p); } 10.000000 0.000000 Compile time error Undefined behaviour what is empty elements in HTML an element with no attribute an element with empty content an element with no comment an element with no tag choose the correct HTML tag to left align the content of cell horizontally ? None of these Consider c code int main(){ printf("%d",sizeof(3.8)); return 0; } Which of the following is true? 10 Compiler Error None of these 8 4 Which of the following is correct about Hex Code format of CSS colors? All of above The last are the blue value(BB). The first two digits(RR) represent a red value. The next two are a green value(GG). Which of the following property of a anchor element signifies an element that currently has the user's mouse pointer hovering over it? active hover link visited #include #include int main(){ void (*p)(); int (*q)(); int (*r)(); p = clrscr; q = getch; r = puts; (*p)(); (*r)("cquestionbank.blogspot.com"); (*q)(); return 0; } (A) NULL (B) cquestionbank.blogspot.com (C) c (D) Compilation error (E) None of above B D C A What is the output of the following: #include int fun(int count) { printf("%d\n", count); if(count < 3) { fun(fun(fun(++count))); } return count; } int main() { fun(1); return 0; } A. 1 2 3 3 3 3 3 B. 1 2 3 C. 1 2 2 2 2 2 2 D. 1 2 C B D A Apart from tag, what other tag makes text bold ? #include int main() { int a=10; void f(); a = f(); printf("%d\n", a); return 0; } void f() { printf("Hi"); } A. Error: Not allowed assignment B. Error: Doesn't print anything C. No error D. None of above C D A B which HTML tag is used to display the power of any expression ? What is the correct HTML for referring to an external style sheet? None of these If you want the table borders to collapse into one border, which property you will use ? border-collapse: none; border-collapse: collapse; border-collapse: -1; border-collapse: 0; #define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); } sizeof(i)=2 sizeof(i)=1 Depends on compiler sizeof(i)=65 Which of the following selector matches all elements of a type? The Universal Selector The Type Selector The Descendant Selector The Class Selector Which of the following property serves as shorthand for the padding properties? padding-right padding-top padding padding-left #include int main(){ int i,j; i=j=2,3; while(--i&&j++) printf("%d %d",i,j); return 0; } A.1 3 B.2 3 C.1 2 D.1 2 3 B D C A HTML web pages can be read and rendered by _________. Server Interpreter Web Browser Compiler How do you add a background color for all HTML elements? h1.all {background-color:#FFFFFF; h1 {background-color:#FFFFFF; all.h1 {background-color:#FFFFFF;} Which of the following selector selects all paragraph elements with a lang attribute? p[lang] p[lang|="fr"] Show Answer p[lang~="fr"] p[lang="fr"] ..... tag is used for ______? Table Heading None of these Table Row Table Record Which of the following property is used to change the face of a font? font-weight font-variant font-family font-style Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters? text-align text-transform text-indent text-decoration Which of the following is an attribute of tag ? link cellpadding Bold src Fundamental HTML Block is known as ___________. HTML Body HTML Tag HTML Element HTML Attribute How do you display hyperlinks without an underline? a {text-decoration:none} a {text-decoration:no underline} a {underline:none} a {decoration:no underline} What is return type of malloc() function? int void int* void* #include main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); } 3hello 3 hello Compiler error n how to set picture as a background web page ? the element is container for webpages metadata pictures links which organization defines the web standards ? w3 World Wide Web Consortium Microsoft corporation IBM corporation What is use of \r in c? places cursor at the end of line places cursor at the start of line used to insert a tab used to insert a vertical tab what is mean by alt value in tag ? Caption of image Alternative text of image Alternative source of image All of above How can you open a link in a new tab/browser window? in HTML iframe is used to to display web page within a web page to display picture within a picture to display a table within a table to display link within a link Which of the following is illegal? string s, *sp = 0; int *pi = 0; int i; double* dp = &i; int *ip; What tag is used to display a picture in a HTML page? img picture image src HTML uses Fixed tags defined by the language User defined tags Pre-specified tags Tags only for linking Tags and test that are not directly displayed on the page are written in _____ section. HTML is what type of language ? Programming Language Markup Language Network Protocol Scripting Language Size of void pointer is 2 byte 1 byte 4 byte 8 byte void print(int n) { if (n == 0) return; printf("%d", n%2); print(n/2); } What will be the output of print(12). 1001 1100 0011 1000 void main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); } mmmm aaaa nnnn aaaa mmmm nnnn mmmm aa nn mmm aa nnn Which of the following is a way to associate styles with your HTML document? None of the above. Embedded CSS - The Element Both of the above. Inline CSS - The style Attribute Which of the following property is used to increase or decrease how bold or light a font appears? font-size font-weight font-variant font-style Time's up