my idea is to read upto 6 bytes so i used 6(char,6) and to store buffer in character so declared as char(char,6).serial.readuntil function return character stored in buffer so assigned that to char
but i am getting error:"primary expression missing before char"
maybe this due to my poor understanding of that function help me please
Serial.available() returns true if there is at least one byte in the buffer.
That does not mean you can read 10 bytes(or chars) from the buffer.
Please take time to go through the reference and tutorial section of Arduino.cc
There is a lot of information about how to do things in the Arduino language.
Time spent there is not lost!