ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?
 Question Submitted By :: Bharat
I also faced this Question!!     Rank Answer Posted By  
 
  Re: DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?
Answer
# 1
1) C is structured oriented language and C++ is an object oriented language
2) in C we must finish our decleration in the very next line of void main() , but in Cpp wherever u need a variable storage data , before that instruction we must declare it......
3) In C structures are used , in that only data members can only be declared and member functions not included , but in Cpp inside a class (same as strucutres) both data members as well as member functions can be used..
4) in Structure all the members and strucutre variables are global by default...... but in Cpp by default the data members are private.....


SIMILARITY :
1) both C & C++ uses Overloading concept....... (very important )

thank u
 
Is This Answer Correct ?    1 Yes 0 No
Vignesh1998i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program Subex3
What is the diffrent between while and do while statement ?  5
main is a predefined or user define function if user defined why? if predefined whay? TCS2
How to reverse a string using a recursive function, without swapping or using an extra memory? Motorola18
Reverse a string word by word??  6
program to get the remainder and quotant of given two numbers with out using % and / operators? IBM8
Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning Accenture4
How can I allocate arrays or structures bigger than 64K?  4
write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101) Bosch1
pgm to reverse string using arrays i.e god is love becomes love is god) (assumption:only space is used for seperation of words) no addtional memory used.i.e no temporary arrays can used. Persistent4
What is the relation between # and include<stdio.h> HCL3
write a program to insert an element at the specified position in the given array in c language IBM2
write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer) Wipro7
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?  3
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +  1
explain about storage of union elements. Bosch2
Difference between null pointer and dangling pointer? Wipro3
how to impliment 2 or more stacks in a single dimensional array ? iFlex1
18)struct base {int a,b; base(); int virtual function1(); } struct derv1:base{ int b,c,d; derv1() int virtual function1(); } struct derv2 : base {int a,e; } base::base() { a=2;b=3; } derv1::derv1(){ b=5; c=10;d=11;} base::function1() {return(100); } derv1::function1() { return(200); } main() base ba; derv1 d1,d2; printf("%d %d",d1.a,d1.b) o/p is a)a=2;b=3; b)a=3; b=2; c)a=5; b=10; d)none 19) for the above program answer the following q's main() base da; derv1 d1; derv2 d2; printf("%d %d %d",da.function1(),d1.function1(),d2.function1 ()); o/p is a)100,200,200; b)200,100,200; c)200,200,100; d)none 20)struct { int x; int y; }abc; you can not access x by the following 1)abc-->x; 2)abc[0]-->x; abc.x; (abc)-->x; a)1,2,3 b)2&3 c)1&2 d)1,3,4  1
int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[] Hughes4
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com