Difference between Class and Struct.
Answers were Sorted based on User's Feedback
Answer / ravish
Structure is a value type variable, but a class is a
reference type variable.
We can create an object of a class but not for a structure.
Structures does not have function definition but a class has..
| Is This Answer Correct ? | 6 Yes | 7 No |
Answer / farhat khan
In C struct does not use function(method).
| Is This Answer Correct ? | 6 Yes | 10 No |
Answer / naksh @tcs
The major difference between struct and class is :
Struct donot contain functions(methods) as its members.
Yes, by default members of struct are public and that of a
class are private.
| Is This Answer Correct ? | 33 Yes | 79 No |
Can you assign a different address to an array tag?
write a addition of two no. program with out using printf,scanf,puts .
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
What is the size of array float a(10)?
n=7623 { temp=n/10; result=temp*10+ result; n=n/10 }
write a c/c++ programthat connects to a MYSQL server and checks if the INNoDB plug in is installed on it.If so your program should print the total number of disk writes by MYSQL.
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
What are the three constants used in c?
#include <stdio.h> void main() { int i=-1,j=1,k,l; k=!i&&j; l=!i||j; printf ("%d%d",k,l) ; }
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?