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